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.
- data/app_generators/emergent_core/emergent_core_generator.rb +1 -1
- data/lib/emergent_core.rb +1 -1
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentsManager.as +3 -3
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/MainManager.as +0 -1
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresentationModelViewMap.mxml +2 -7
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/MainModel.as +3 -2
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main.mxml +2 -1
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as +8 -5
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_view.mxml +2 -2
- metadata +1 -1
data/lib/emergent_core.rb
CHANGED
@@ -66,10 +66,10 @@ package <%= base_package %>.controllers.manager {
|
|
66
66
|
}
|
67
67
|
|
68
68
|
override public function save(resource:*):void {
|
69
|
-
if (
|
70
|
-
update(
|
69
|
+
if (resource.content.id) {
|
70
|
+
update(resource.content);
|
71
71
|
} else {
|
72
|
-
create(
|
72
|
+
create(resource.content);
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
@@ -6,13 +6,7 @@
|
|
6
6
|
|
7
7
|
import mx.events.FlexEvent;
|
8
8
|
|
9
|
-
import <%= base_package %>.models.presentation
|
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="
|
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}"
|
data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as
CHANGED
@@ -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.
|
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}"
|
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}"
|
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)}"
|