From dadb08aaa017db477f2bfa95727c73e44e482348 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 13:30:32 -0700 Subject: fixing the menu binding resulting in 1 === true > false Signed-off-by: Valerio Virgillito --- js/components/menu/menu-item.reel/menu-item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') 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, { if(this.data.radio && this.checked) return; - if((this.enabled === true) && (this.submenu === false) ) { + if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) { if(this.data.action) { NJevent ( this.data.action ); } else if(this.checked !== null) { -- cgit v1.2.3 From 99f16ae08fbb0a6dfe6008c9833f2253b18c19e5 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 14:13:28 -0700 Subject: removing first draw on the component event Signed-off-by: Valerio Virgillito --- js/controllers/document-controller.js | 13 +------------ js/panels/components-panel.reel/components-panel.js | 8 -------- 2 files changed, 1 insertion(+), 20 deletions(-) (limited to 'js') 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, this.eventManager.addEventListener("styleSheetDirty", this, false); - this.eventManager.addEventListener("addComponentFirstDraw", this, false); - // Temporary add listeners for the new stage templates this.eventManager.addEventListener("executeWebpageOpen", this, false); this.eventManager.addEventListener("executeNewWebpage", this, false); } }, - handleAddComponentFirstDraw: { - value: function (e) { - //TODO: Add logic to reparse the document for dynamically added styles - //console.log(e); - } - }, - - - - + //TODO: Ensure these APIs are not needed //////////////////////////////////////////////////////////////////// // diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index 53049cad..37fd9b44 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, { } } - instance.addEventListener('firstDraw', that, false); - that.application.ninja.currentDocument.model.setComponentInstance(instance, element); that.application.ninja.elementMediator.addElements(element, styles); @@ -304,12 +302,6 @@ exports.ComponentsPanel = Montage.create(Component, { } }, - - handleFirstDraw: { - value: function (e) { - NJevent("addComponentFirstDraw"); - } - }, makeComponent: { value: function(name) { -- cgit v1.2.3