aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/document-bar.reel
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-12 16:25:47 -0700
committerValerio Virgillito2012-03-12 16:25:47 -0700
commitc24f58c10231c30d3a8a4c9fb9a4f395dd746180 (patch)
treea0be6ee1daa3e21ed7df483721bc3116e4c20006 /js/components/layout/document-bar.reel
parentac2db49e51f82f5a1cf52ec854b047e007ffbdd7 (diff)
downloadninja-c24f58c10231c30d3a8a4c9fb9a4f395dd746180.tar.gz
Merge dhg637 DisabledState into master.
Committing Disabled states for tool-bar, tool-options, viewbar, breadcrumb Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/components/layout/document-bar.reel')
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html26
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js10
2 files changed, 18 insertions, 18 deletions
diff --git a/js/components/layout/document-bar.reel/document-bar.html b/js/components/layout/document-bar.reel/document-bar.html
index 5a4ca2be..bd13f231 100755
--- a/js/components/layout/document-bar.reel/document-bar.html
+++ b/js/components/layout/document-bar.reel/document-bar.html
@@ -32,19 +32,8 @@
32 } 32 }
33 }, 33 },
34 34
35 "owner": { 35 "disable": {
36 "module": "js/components/layout/document-bar.reel", 36 "prototype": "montage/ui/condition.reel",
37 "name": "DocumentBar",
38 "properties": {
39 "element": {"#": "documentBar"},
40 "designView": {"#": "design"},
41 "codeView": {"#": "code"},
42 "zoomControl": {"@": "hottext1"}
43 }
44 },
45 "Disable": {
46 "module": "montage/ui/condition.reel",
47 "name": "Condition",
48 "properties": { 37 "properties": {
49 "element": {"#": "disabledCondition"} 38 "element": {"#": "disabledCondition"}
50 }, 39 },
@@ -55,6 +44,17 @@
55 "oneway": true 44 "oneway": true
56 } 45 }
57 } 46 }
47 },
48
49 "owner": {
50 "module": "js/components/layout/document-bar.reel",
51 "name": "DocumentBar",
52 "properties": {
53 "element": {"#": "documentBar"},
54 "designView": {"#": "design"},
55 "codeView": {"#": "code"},
56 "zoomControl": {"@": "hottext1"}
57 }
58 } 58 }
59 } 59 }
60 </script> 60 </script>
diff --git a/js/components/layout/document-bar.reel/document-bar.js b/js/components/layout/document-bar.reel/document-bar.js
index 1f2deb59..4dc39fd6 100755
--- a/js/components/layout/document-bar.reel/document-bar.js
+++ b/js/components/layout/document-bar.reel/document-bar.js
@@ -13,7 +13,7 @@ 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}, 16 disabled: { value: true },
17 17
18 18
19 19
@@ -87,7 +87,7 @@ exports.DocumentBar = Montage.create(Component, {
87 87
88 prepareForDraw: { 88 prepareForDraw: {
89 value: function() { 89 value: function() {
90 this.eventManager.addEventListener( "onOpenDocument", this, false); 90 this.eventManager.addEventListener( "openDocument", this, false);
91 this.eventManager.addEventListener( "closeDocument", this, false); 91 this.eventManager.addEventListener( "closeDocument", this, false);
92 this.designView.addEventListener("click", this, false); 92 this.designView.addEventListener("click", this, false);
93 this.codeView.addEventListener("click", this, false); 93 this.codeView.addEventListener("click", this, false);
@@ -104,14 +104,14 @@ exports.DocumentBar = Montage.create(Component, {
104 } 104 }
105 }, 105 },
106 106
107 handleOnOpenDocument: { 107 handleOpenDocument: {
108 value: function(){ 108 value: function() {
109 this.disabled = false; 109 this.disabled = false;
110 } 110 }
111 }, 111 },
112 112
113 handleCloseDocument: { 113 handleCloseDocument: {
114 value: function(){ 114 value: function() {
115 if(!this.application.ninja.documentController.activeDocument) { 115 if(!this.application.ninja.documentController.activeDocument) {
116 this.disabled = true; 116 this.disabled = true;
117 } 117 }