diff options
author | Armen Kesablyan | 2012-03-12 13:39:58 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-03-12 13:39:58 -0700 |
commit | ac2db49e51f82f5a1cf52ec854b047e007ffbdd7 (patch) | |
tree | c51282b104328bf93eabc94ef1b837f0041d23bc /js/ninja.reel | |
parent | 69d90467865a1384725b2301901be2180c5a841f (diff) | |
download | ninja-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/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.html | 15 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.js | 15 |
2 files changed, 29 insertions, 1 deletions
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 8f6f6d7b..4dd6e25d 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -316,6 +316,20 @@ | |||
316 | "timeline": {"@": "timeline"}, | 316 | "timeline": {"@": "timeline"}, |
317 | "mainMenuController": {"@": "mainMenuController"} | 317 | "mainMenuController": {"@": "mainMenuController"} |
318 | } | 318 | } |
319 | }, | ||
320 | "toolOptionsDisable": { | ||
321 | "module": "montage/ui/condition.reel", | ||
322 | "name": "Condition", | ||
323 | "properties": { | ||
324 | "element": {"#": "disabledCondition"} | ||
325 | }, | ||
326 | "bindings": { | ||
327 | "condition": { | ||
328 | "boundObject": {"@": "owner"}, | ||
329 | "boundObjectPropertyPath": "disabled", | ||
330 | "oneway": true | ||
331 | } | ||
332 | } | ||
319 | } | 333 | } |
320 | } | 334 | } |
321 | </script> | 335 | </script> |
@@ -340,6 +354,7 @@ | |||
340 | <div id="topPanel" class="panel"> | 354 | <div id="topPanel" class="panel"> |
341 | <div id="toolPropertiesPanel"> | 355 | <div id="toolPropertiesPanel"> |
342 | <div id="toolsProperties"></div> | 356 | <div id="toolsProperties"></div> |
357 | <div id="disabledCondition" class="panelDisabled"></div> | ||
343 | </div> | 358 | </div> |
344 | 359 | ||
345 | <div id="stageMode" class="unselectable marginposition"> | 360 | <div id="stageMode" class="unselectable marginposition"> |
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 88361fd9..5af9bcdf 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -12,6 +12,18 @@ var matrix = require("js/lib/math/matrix"); | |||
12 | 12 | ||
13 | exports.Ninja = Montage.create(Component, { | 13 | exports.Ninja = Montage.create(Component, { |
14 | 14 | ||
15 | disabled: { | ||
16 | value: true | ||
17 | }, | ||
18 | |||
19 | handleCloseDocument: { | ||
20 | value: function(){ | ||
21 | if(!this.application.ninja.documentController.activeDocument) { | ||
22 | this.disabled = true; | ||
23 | } | ||
24 | } | ||
25 | }, | ||
26 | |||
15 | ninjaVersion: { | 27 | ninjaVersion: { |
16 | value: null | 28 | value: null |
17 | }, | 29 | }, |
@@ -57,6 +69,7 @@ exports.Ninja = Montage.create(Component, { | |||
57 | this.eventManager.addEventListener( "selectTool", this, false); | 69 | this.eventManager.addEventListener( "selectTool", this, false); |
58 | this.eventManager.addEventListener( "selectSubTool", this, false); | 70 | this.eventManager.addEventListener( "selectSubTool", this, false); |
59 | this.eventManager.addEventListener( "onOpenDocument", this, false); | 71 | this.eventManager.addEventListener( "onOpenDocument", this, false); |
72 | this.eventManager.addEventListener( "closeDocument", this, false); | ||
60 | 73 | ||
61 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); | 74 | this.addEventListener("change@appModel.livePreview", this.executeLivePreview, false); |
62 | this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); | 75 | this.addEventListener("change@appModel.chromePreview", this.executeChromePreview, false); |
@@ -143,7 +156,7 @@ exports.Ninja = Montage.create(Component, { | |||
143 | this.currentDocument = event.detail; | 156 | this.currentDocument = event.detail; |
144 | 157 | ||
145 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; | 158 | this.appModel.show3dGrid = this.currentDocument.draw3DGrid; |
146 | 159 | this.disabled = false; | |
147 | NJevent("openDocument"); | 160 | NJevent("openDocument"); |
148 | } | 161 | } |
149 | }, | 162 | }, |