emergent-core 0.1.01 → 0.1.02

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  require 'restfulx'
2
2
 
3
- class EmergentGenerator < RubiGen::Base
3
+ class EmergentCoreGenerator < RubiGen::Base
4
4
  include RestfulX::Configuration
5
5
 
6
6
  attr_reader :project_name,
data/lib/emergent_core.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  module EmergentCore
3
3
 
4
4
  # :stopdoc:
5
- VERSION = '0.1.01'
5
+ VERSION = '0.1.02'
6
6
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
7
7
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
8
8
  # :startdoc:
@@ -66,10 +66,10 @@ package <%= base_package %>.controllers.manager {
66
66
  }
67
67
 
68
68
  override public function save(resource:*):void {
69
- if (r.content.id) {
70
- update(r);
69
+ if (resource.content.id) {
70
+ update(resource.content);
71
71
  } else {
72
- create(r);
72
+ create(resource.content);
73
73
  }
74
74
  }
75
75
 
@@ -16,7 +16,6 @@ package <%= base_package %>.controllers.manager {
16
16
  [Bindable] public var cmsMode:Boolean;
17
17
 
18
18
  public function MainManager() {
19
- setModel(target);
20
19
  }
21
20
 
22
21
  }
@@ -6,13 +6,7 @@
6
6
 
7
7
  import mx.events.FlexEvent;
8
8
 
9
- import <%= base_package %>.models.presentation.AccountModel;
10
- import <%= base_package %>.models.presentation.ProfileModel;
11
- import <%= base_package %>.models.presentation.ContactUsModel;
12
- import <%= base_package %>.models.presentation.AuthenticationModel;
13
- import <%= base_package %>.models.presentation.HomeModel;
14
- import <%= base_package %>.models.presentation.AboutUsModel;
15
- import <%= base_package %>.models.presentation.MainModel;
9
+ import <%= base_package %>.models.presentation.*;
16
10
 
17
11
  import <%= base_package %>.views.account.AccountView;
18
12
  import <%= base_package %>.views.login.LoginView;
@@ -21,6 +15,7 @@
21
15
  import <%= base_package %>.views.home.HomeView;
22
16
  import <%= base_package %>.views.aboutUs.AboutUsView;
23
17
  import <%= base_package %>.views.main.MainView;
18
+ import <%= base_package %>.views.navigation.*;
24
19
 
25
20
  ]]>
26
21
  </mx:Script>
@@ -16,14 +16,15 @@ package <%= base_package %>.models.presentation {
16
16
 
17
17
  [Bindable] public var login:Boolean;
18
18
  [Bindable] public var logout:Boolean;
19
+ [Bindable] public var cmsMode:Boolean;
19
20
 
20
- private var _cmsMode:Boolean;
21
+ /*private var _cmsMode:Boolean;
21
22
  /** This property is injected by the application. */
22
23
  public function set cmsMode(value:Boolean):void {
23
24
  _cmsMode = value;
24
25
 
25
26
  dispatchEvent(new Event("cmsModeChanged"));
26
- }
27
+ }*/
27
28
 
28
29
  [Bindable] public var gotoProfile:Boolean;
29
30
 
@@ -34,6 +34,7 @@
34
34
  <!-- Presenter Wraps the View and Handles Navigation Animations
35
35
  Model allows you to easily call CRUD methods and handle sorting on data -->
36
36
  <mx:Declarations>
37
+ <presentation:MainModel id="model"/>
37
38
  <main:MainPresenter id="presenter" view="{this}"/>
38
39
  <animators:FourDTweenCollection id="t"/>
39
40
  </mx:Declarations>
@@ -111,7 +112,7 @@
111
112
  tweenParams="{[{tween:t.centerPlaneFlipTweenTo, flipTo:t.centerPlaneFlipTweenFrom, when:'onStart'}]}"
112
113
  click="{profileView.tween(event)}"/>
113
114
 
114
- <nav:NavigationBarsView id="navigationBarsView" width="100%" height="100%"/>
115
+ <nav:NavigationBarsView id="navigationBarsView" width="{this.width}" height="{this.height}"/>
115
116
 
116
117
  <pages:PagesView id="pagesView" name="main"
117
118
  width="{this.width}" height="{this.height}"
@@ -57,10 +57,11 @@ package <%= base_package %>.views.main {
57
57
 
58
58
  public function MainPresenter() {
59
59
  t = new FourDTweenCollection();
60
- BindingUtils.bindSetter(toggleCms, this, ["mainModel", "cmsMode"]);
61
60
  }
62
-
61
+
62
+ private var completed:Boolean = false;
63
63
  public function toggleCms(prop:*):void {
64
+ if (!completed) { return; }
64
65
  if (prop == true) {
65
66
  mainView.loginView.visible = false;
66
67
  mainView.documentsView.visible = true;
@@ -85,11 +86,13 @@ package <%= base_package %>.views.main {
85
86
  troparchy.view = mainView;
86
87
  troparchy.dispatcher = this; //localDispatcher;
87
88
 
89
+ BindingUtils.bindSetter(toggleCms, mainView, ["model", "cmsMode"]);
90
+
88
91
  components = [mainView.pagesView, mainView.loginView, mainView.accountView,
89
- mainView.contactUsView, mainView.navigationBarsView,
92
+ mainView.contactUsView, mainView.navigationBarsView, mainView.documentsView,
90
93
  mainView.profileView];
91
- visibleComponents = [mainView.documentsView];
92
-
94
+ visibleComponents = [mainView.loginView, mainView.navigationBarsView];
95
+ completed = true;
93
96
  fpsContainer = new UIComponent();
94
97
  fps = new FPS();
95
98
  fpsContainer.addChild(fps);
@@ -42,14 +42,14 @@
42
42
  />
43
43
 
44
44
  <nav:NavigationBarTopView id="navigationBarTopView" pivotX="center" pivotY="top"
45
- y="0" x="{this.width/2}" width="{this.width}" height="{this.height}"
45
+ y="0" x="{this.width/2}" width="{this.width}"
46
46
  tweens="{[t.topPlaneTweenTo]}"
47
47
  tweenParams="{[{tween:t.topPlaneTweenTo, flipTo:t.topPlaneTweenFrom, when:'onStart'}]}"
48
48
  click="{navigationBarTopView.tween(event)}"
49
49
  />
50
50
 
51
51
  <nav:NavigationBarBottomView id="navigationBarBottomView" pivotX="center" pivotY="bottom"
52
- y="{this.height}" x="{this.width/2}" width="{this.width}" height="{this.height}"
52
+ y="{this.height}" x="{this.width/2}" width="{this.width}"
53
53
  tweens="{[t.bottomPlaneTweenTo]}"
54
54
  tweenParams="{[{tween:t.bottomPlaneTweenTo, flipTo:t.bottomPlaneTweenFrom, when:'onStart'}]}"
55
55
  click="{navigationBarBottomView.tween(event)}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emergent-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.01
4
+ version: 0.1.02
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lance Pollard