From ac2db49e51f82f5a1cf52ec854b047e007ffbdd7 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Mon, 12 Mar 2012 13:39:58 -0700 Subject: Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb Signed-off-by: Armen Kesablyan --- .../layout/document-bar.reel/document-bar.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'js/components/layout/document-bar.reel/document-bar.js') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index ea5e3280..1f2deb59 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -13,6 +13,9 @@ exports.DocumentBar = Montage.create(Component, { codeView: { value: null, enumerable: false}, zoomControl: { value: null, enumerable: false }, _type: { enumerable: false, value: null }, + disabled: {value: true}, + + type: { enumerable: false, @@ -84,6 +87,8 @@ exports.DocumentBar = Montage.create(Component, { prepareForDraw: { value: function() { + this.eventManager.addEventListener( "onOpenDocument", this, false); + this.eventManager.addEventListener( "closeDocument", this, false); this.designView.addEventListener("click", this, false); this.codeView.addEventListener("click", this, false); @@ -99,6 +104,20 @@ exports.DocumentBar = Montage.create(Component, { } }, + handleOnOpenDocument: { + value: function(){ + this.disabled = false; + } + }, + + handleCloseDocument: { + value: function(){ + if(!this.application.ninja.documentController.activeDocument) { + this.disabled = true; + } + } + }, + handleOnDocumentChanged:{ value:function(event){ -- cgit v1.2.3 From c24f58c10231c30d3a8a4c9fb9a4f395dd746180 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 12 Mar 2012 16:25:47 -0700 Subject: Merge dhg637 DisabledState into master. Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb Signed-off-by: Valerio Virgillito --- js/components/layout/document-bar.reel/document-bar.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/components/layout/document-bar.reel/document-bar.js') diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js index 1f2deb59..4dc39fd6 100755 --- a/js/components/layout/document-bar.reel/document-bar.js +++ b/js/components/layout/document-bar.reel/document-bar.js @@ -13,7 +13,7 @@ exports.DocumentBar = Montage.create(Component, { codeView: { value: null, enumerable: false}, zoomControl: { value: null, enumerable: false }, _type: { enumerable: false, value: null }, - disabled: {value: true}, + disabled: { value: true }, @@ -87,7 +87,7 @@ exports.DocumentBar = Montage.create(Component, { prepareForDraw: { value: function() { - this.eventManager.addEventListener( "onOpenDocument", this, false); + this.eventManager.addEventListener( "openDocument", this, false); this.eventManager.addEventListener( "closeDocument", this, false); this.designView.addEventListener("click", this, false); this.codeView.addEventListener("click", this, false); @@ -104,14 +104,14 @@ exports.DocumentBar = Montage.create(Component, { } }, - handleOnOpenDocument: { - value: function(){ + handleOpenDocument: { + value: function() { this.disabled = false; } }, handleCloseDocument: { - value: function(){ + value: function() { if(!this.application.ninja.documentController.activeDocument) { this.disabled = true; } -- cgit v1.2.3