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/components/layout/tools-list.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/components/layout/tools-list.reel')
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.html | 16 | ||||
-rwxr-xr-x | js/components/layout/tools-list.reel/tools-list.js | 17 |
2 files changed, 33 insertions, 0 deletions
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html index 2c5617e5..3e49a4f3 100755 --- a/js/components/layout/tools-list.reel/tools-list.html +++ b/js/components/layout/tools-list.reel/tools-list.html | |||
@@ -165,6 +165,21 @@ | |||
165 | {"@": "repetition1"} | 165 | {"@": "repetition1"} |
166 | ] | 166 | ] |
167 | } | 167 | } |
168 | }, | ||
169 | |||
170 | "disabledCondition": { | ||
171 | "module": "montage/ui/condition.reel", | ||
172 | "name": "Condition", | ||
173 | "properties": { | ||
174 | "element": {"#": "disabledCondition"} | ||
175 | }, | ||
176 | "bindings": { | ||
177 | "condition": { | ||
178 | "boundObject": {"@": "owner"}, | ||
179 | "boundObjectPropertyPath": "disabled", | ||
180 | "oneway": true | ||
181 | } | ||
182 | } | ||
168 | } | 183 | } |
169 | 184 | ||
170 | 185 | ||
@@ -184,6 +199,7 @@ | |||
184 | </div> | 199 | </div> |
185 | <!-- TODO: Remove and add as a component --> | 200 | <!-- TODO: Remove and add as a component --> |
186 | <div id="colortoolbar"></div> | 201 | <div id="colortoolbar"></div> |
202 | <div id="disabledCondition" class="panelDisabled"></div> | ||
187 | </div> | 203 | </div> |
188 | 204 | ||
189 | </body> | 205 | </body> |
diff --git a/js/components/layout/tools-list.reel/tools-list.js b/js/components/layout/tools-list.reel/tools-list.js index e26ab391..b44f63b3 100755 --- a/js/components/layout/tools-list.reel/tools-list.js +++ b/js/components/layout/tools-list.reel/tools-list.js | |||
@@ -29,10 +29,27 @@ exports.ToolsList = Montage.create(Component, { | |||
29 | RotateStageTool3D: { value: null }, | 29 | RotateStageTool3D: { value: null }, |
30 | PanTool: { value: null }, | 30 | PanTool: { value: null }, |
31 | ZoomTool: { value: null }, | 31 | ZoomTool: { value: null }, |
32 | disabled: { value: true}, | ||
33 | |||
34 | handleOnOpenDocument: { | ||
35 | value: function(){ | ||
36 | this.disabled = false; | ||
37 | } | ||
38 | }, | ||
39 | |||
40 | handleCloseDocument: { | ||
41 | value: function(){ | ||
42 | if(!this.application.ninja.documentController.activeDocument) { | ||
43 | this.disabled = true; | ||
44 | } | ||
45 | } | ||
46 | }, | ||
32 | 47 | ||
33 | prepareForDraw: { | 48 | prepareForDraw: { |
34 | enumerable: false, | 49 | enumerable: false, |
35 | value: function() { | 50 | value: function() { |
51 | this.eventManager.addEventListener( "onOpenDocument", this, false); | ||
52 | this.eventManager.addEventListener( "closeDocument", this, false); | ||
36 | this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; | 53 | this.PenTool.options = this.application.ninja.toolsProperties.shapeProperties.lineProperties;//this.application.Ninja.toolsProperties.penProperties; |
37 | 54 | ||
38 | this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; | 55 | this.SelectionTool.options = this.application.ninja.toolsProperties.selectionProperties; |