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/bread-crumb.reel/bread-crumb.js | |
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/bread-crumb.reel/bread-crumb.js')
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index b2fa42b1..ff1d1071 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -9,6 +9,25 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | exports.Breadcrumb = Montage.create(Component, { | 10 | exports.Breadcrumb = Montage.create(Component, { |
11 | 11 | ||
12 | disabled: { | ||
13 | value: true | ||
14 | }, | ||
15 | |||
16 | handleOnOpenDocument: { | ||
17 | value: function(){ | ||
18 | this.disabled = false; | ||
19 | } | ||
20 | }, | ||
21 | |||
22 | handleCloseDocument: { | ||
23 | value: function(){ | ||
24 | if(!this.application.ninja.documentController.activeDocument) { | ||
25 | this.disabled = true; | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | |||
30 | |||
12 | _container:{ | 31 | _container:{ |
13 | value:null | 32 | value:null |
14 | }, | 33 | }, |
@@ -31,6 +50,8 @@ exports.Breadcrumb = Montage.create(Component, { | |||
31 | 50 | ||
32 | prepareForDraw: { | 51 | prepareForDraw: { |
33 | value: function() { | 52 | value: function() { |
53 | this.eventManager.addEventListener( "onOpenDocument", this, false); | ||
54 | this.eventManager.addEventListener( "closeDocument", this, false); | ||
34 | this.breadcrumbBt.addEventListener("action", this, false); | 55 | this.breadcrumbBt.addEventListener("action", this, false); |
35 | } | 56 | } |
36 | }, | 57 | }, |