aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-bar.reel/document-bar.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-03-12 13:39:58 -0700
committerArmen Kesablyan2012-03-12 13:39:58 -0700
commitac2db49e51f82f5a1cf52ec854b047e007ffbdd7 (patch)
treec51282b104328bf93eabc94ef1b837f0041d23bc /js/components/layout/document-bar.reel/document-bar.js
parent69d90467865a1384725b2301901be2180c5a841f (diff)
downloadninja-ac2db49e51f82f5a1cf52ec854b047e007ffbdd7.tar.gz
Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/components/layout/document-bar.reel/document-bar.js')
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js19
1 files changed, 19 insertions, 0 deletions
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, {
13 codeView: { value: null, enumerable: false}, 13 codeView: { value: null, enumerable: false},
14 zoomControl: { value: null, enumerable: false }, 14 zoomControl: { value: null, enumerable: false },
15 _type: { enumerable: false, value: null }, 15 _type: { enumerable: false, value: null },
16 disabled: {value: true},
17
18
16 19
17 type: { 20 type: {
18 enumerable: false, 21 enumerable: false,
@@ -84,6 +87,8 @@ exports.DocumentBar = Montage.create(Component, {
84 87
85 prepareForDraw: { 88 prepareForDraw: {
86 value: function() { 89 value: function() {
90 this.eventManager.addEventListener( "onOpenDocument", this, false);
91 this.eventManager.addEventListener( "closeDocument", this, false);
87 this.designView.addEventListener("click", this, false); 92 this.designView.addEventListener("click", this, false);
88 this.codeView.addEventListener("click", this, false); 93 this.codeView.addEventListener("click", this, false);
89 94
@@ -99,6 +104,20 @@ exports.DocumentBar = Montage.create(Component, {
99 } 104 }
100 }, 105 },
101 106
107 handleOnOpenDocument: {
108 value: function(){
109 this.disabled = false;
110 }
111 },
112
113 handleCloseDocument: {
114 value: function(){
115 if(!this.application.ninja.documentController.activeDocument) {
116 this.disabled = true;
117 }
118 }
119 },
120
102 handleOnDocumentChanged:{ 121 handleOnDocumentChanged:{
103 value:function(event){ 122 value:function(event){
104 123