diff options
author | Pushkar Joshi | 2012-03-13 11:24:35 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-03-13 11:24:35 -0700 |
commit | 4ad1650f629e7e345eade52ed6dadc233b27cc45 (patch) | |
tree | 0e7b925f4dedf27f2684915e7e247e79c4a74aff /js/components/layout/bread-crumb.reel | |
parent | 730c42e005b1ebd96448e3bc2dd700ffd8909cb5 (diff) | |
parent | 9f3307810541ca6f95d7ca6d1febe8afdcd2c101 (diff) | |
download | ninja-4ad1650f629e7e345eade52ed6dadc233b27cc45.tar.gz |
Merge branch 'master' into pentool
Diffstat (limited to 'js/components/layout/bread-crumb.reel')
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.css | 2 | ||||
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.html | 15 | ||||
-rwxr-xr-x | js/components/layout/bread-crumb.reel/bread-crumb.js | 20 |
3 files changed, 36 insertions, 1 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.css b/js/components/layout/bread-crumb.reel/bread-crumb.css index 67497e10..dcfd471c 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.css +++ b/js/components/layout/bread-crumb.reel/bread-crumb.css | |||
@@ -8,7 +8,7 @@ | |||
8 | background-color: #282828; | 8 | background-color: #282828; |
9 | border-style: double; | 9 | border-style: double; |
10 | height: 26px; | 10 | height: 26px; |
11 | 11 | position:relative; | |
12 | -webkit-box-flex: 0; | 12 | -webkit-box-flex: 0; |
13 | } | 13 | } |
14 | 14 | ||
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html index f2368e9a..413f588d 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.html +++ b/js/components/layout/bread-crumb.reel/bread-crumb.html | |||
@@ -60,6 +60,20 @@ | |||
60 | "oneway": true | 60 | "oneway": true |
61 | } | 61 | } |
62 | } | 62 | } |
63 | }, | ||
64 | |||
65 | "disable": { | ||
66 | "prototype": "montage/ui/condition.reel", | ||
67 | "properties": { | ||
68 | "element": {"#": "disabledCondition"} | ||
69 | }, | ||
70 | "bindings": { | ||
71 | "condition": { | ||
72 | "boundObject": {"@": "owner"}, | ||
73 | "boundObjectPropertyPath": "disabled", | ||
74 | "oneway": true | ||
75 | } | ||
76 | } | ||
63 | } | 77 | } |
64 | } | 78 | } |
65 | </script> | 79 | </script> |
@@ -71,6 +85,7 @@ | |||
71 | <div id="breadcrumb_container"> | 85 | <div id="breadcrumb_container"> |
72 | <button id="breadcrumb_button" class="nj-skinned"></button> | 86 | <button id="breadcrumb_button" class="nj-skinned"></button> |
73 | </div> | 87 | </div> |
88 | <div id="disabledCondition" class="panelDisabled"></div> | ||
74 | </section> | 89 | </section> |
75 | 90 | ||
76 | </body> | 91 | </body> |
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js index b2fa42b1..ab390fc6 100755 --- a/js/components/layout/bread-crumb.reel/bread-crumb.js +++ b/js/components/layout/bread-crumb.reel/bread-crumb.js | |||
@@ -9,6 +9,24 @@ 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 | handleOpenDocument: { | ||
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 | |||
12 | _container:{ | 30 | _container:{ |
13 | value:null | 31 | value:null |
14 | }, | 32 | }, |
@@ -31,6 +49,8 @@ exports.Breadcrumb = Montage.create(Component, { | |||
31 | 49 | ||
32 | prepareForDraw: { | 50 | prepareForDraw: { |
33 | value: function() { | 51 | value: function() { |
52 | this.eventManager.addEventListener("openDocument", this, false); | ||
53 | this.eventManager.addEventListener("closeDocument", this, false); | ||
34 | this.breadcrumbBt.addEventListener("action", this, false); | 54 | this.breadcrumbBt.addEventListener("action", this, false); |
35 | } | 55 | } |
36 | }, | 56 | }, |