aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-05-16 14:22:49 -0700
committerJose Antonio Marquez2012-05-16 14:22:49 -0700
commite3368b4fa06be7859315f246494973cba10804c2 (patch)
treecd966d90ed27596c351067099b6cdde9595cf1ae /js
parentac750fd9b9c311dcd48c6ee309607edc6fa048e1 (diff)
parent99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 (diff)
downloadninja-e3368b4fa06be7859315f246494973cba10804c2.tar.gz
Merge branch 'refs/heads/Ninja-DOM-Architecture' into Document
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/menu/menu-item.reel/menu-item.js2
-rwxr-xr-xjs/controllers/document-controller.js13
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js8
3 files changed, 2 insertions, 21 deletions
diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js
index 26fc7573..fc3913b8 100755
--- a/js/components/menu/menu-item.reel/menu-item.js
+++ b/js/components/menu/menu-item.reel/menu-item.js
@@ -141,7 +141,7 @@ exports.MenuItem = Montage.create(Component, {
141 141
142 if(this.data.radio && this.checked) return; 142 if(this.data.radio && this.checked) return;
143 143
144 if((this.enabled === true) && (this.submenu === false) ) { 144 if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) {
145 if(this.data.action) { 145 if(this.data.action) {
146 NJevent ( this.data.action ); 146 NJevent ( this.data.action );
147 } else if(this.checked !== null) { 147 } else if(this.checked !== null) {
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index fba9fad5..1e894f02 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -76,24 +76,13 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
76 76
77 this.eventManager.addEventListener("styleSheetDirty", this, false); 77 this.eventManager.addEventListener("styleSheetDirty", this, false);
78 78
79 this.eventManager.addEventListener("addComponentFirstDraw", this, false);
80
81 // Temporary add listeners for the new stage templates 79 // Temporary add listeners for the new stage templates
82 this.eventManager.addEventListener("executeWebpageOpen", this, false); 80 this.eventManager.addEventListener("executeWebpageOpen", this, false);
83 this.eventManager.addEventListener("executeNewWebpage", this, false); 81 this.eventManager.addEventListener("executeNewWebpage", this, false);
84 } 82 }
85 }, 83 },
86 84
87 handleAddComponentFirstDraw: { 85
88 value: function (e) {
89 //TODO: Add logic to reparse the document for dynamically added styles
90 //console.log(e);
91 }
92 },
93
94
95
96
97 //TODO: Ensure these APIs are not needed 86 //TODO: Ensure these APIs are not needed
98 //////////////////////////////////////////////////////////////////// 87 ////////////////////////////////////////////////////////////////////
99 // 88 //
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js
index fdf744d2..e028d1db 100755
--- a/js/panels/components-panel.reel/components-panel.js
+++ b/js/panels/components-panel.reel/components-panel.js
@@ -295,8 +295,6 @@ exports.ComponentsPanel = Montage.create(Component, {
295 } 295 }
296 } 296 }
297 297
298 instance.addEventListener('firstDraw', that, false);
299
300 that.application.ninja.currentDocument.model.setComponentInstance(instance, element); 298 that.application.ninja.currentDocument.model.setComponentInstance(instance, element);
301 299
302 that.application.ninja.elementMediator.addElements(element, styles); 300 that.application.ninja.elementMediator.addElements(element, styles);
@@ -304,12 +302,6 @@ exports.ComponentsPanel = Montage.create(Component, {
304 302
305 } 303 }
306 }, 304 },
307
308 handleFirstDraw: {
309 value: function (e) {
310 NJevent("addComponentFirstDraw");
311 }
312 },
313 305
314 makeComponent: { 306 makeComponent: {
315 value: function(name) { 307 value: function(name) {