aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.html6
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js7
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.html26
-rwxr-xr-xjs/components/layout/document-bar.reel/document-bar.js10
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.html33
-rwxr-xr-xjs/components/layout/tools-list.reel/tools-list.js4
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.html16
-rwxr-xr-xjs/components/layout/tools-properties.reel/tools-properties.js21
-rwxr-xr-xjs/ninja.reel/ninja.html15
-rwxr-xr-xjs/ninja.reel/ninja.js14
10 files changed, 77 insertions, 75 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.html b/js/components/layout/bread-crumb.reel/bread-crumb.html
index 9f24cee5..413f588d 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.html
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.html
@@ -61,9 +61,9 @@
61 } 61 }
62 } 62 }
63 }, 63 },
64 "Disable": { 64
65 "module": "montage/ui/condition.reel", 65 "disable": {
66 "name": "Condition", 66 "prototype": "montage/ui/condition.reel",
67 "properties": { 67 "properties": {
68 "element": {"#": "disabledCondition"} 68 "element": {"#": "disabledCondition"}
69 }, 69 },
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index ff1d1071..ab390fc6 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -13,7 +13,7 @@ exports.Breadcrumb = Montage.create(Component, {
13 value: true 13 value: true
14 }, 14 },
15 15
16 handleOnOpenDocument: { 16 handleOpenDocument: {
17 value: function(){ 17 value: function(){
18 this.disabled = false; 18 this.disabled = false;
19 } 19 }
@@ -27,7 +27,6 @@ exports.Breadcrumb = Montage.create(Component, {
27 } 27 }
28 }, 28 },
29 29
30
31 _container:{ 30 _container:{
32 value:null 31 value:null
33 }, 32 },
@@ -50,8 +49,8 @@ exports.Breadcrumb = Montage.create(Component, {
50 49
51 prepareForDraw: { 50 prepareForDraw: {
52 value: function() { 51 value: function() {
53 this.eventManager.addEventListener( "onOpenDocument", this, false); 52 this.eventManager.addEventListener("openDocument", this, false);
54 this.eventManager.addEventListener( "closeDocument", this, false); 53 this.eventManager.addEventListener("closeDocument", this, false);
55 this.breadcrumbBt.addEventListener("action", this, false); 54 this.breadcrumbBt.addEventListener("action", this, false);
56 } 55 }
57 }, 56 },
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 }
diff --git a/js/components/layout/tools-list.reel/tools-list.html b/js/components/layout/tools-list.reel/tools-list.html
index 3e49a4f3..5996e446 100755
--- a/js/components/layout/tools-list.reel/tools-list.html
+++ b/js/components/layout/tools-list.reel/tools-list.html
@@ -136,6 +136,21 @@
136 "name": "ZoomTool" 136 "name": "ZoomTool"
137 }, 137 },
138 138
139 "disable": {
140 "module": "montage/ui/condition.reel",
141 "name": "Condition",
142 "properties": {
143 "element": {"#": "disabledCondition"}
144 },
145 "bindings": {
146 "condition": {
147 "boundObject": {"@": "owner"},
148 "boundObjectPropertyPath": "disabled",
149 "oneway": true
150 }
151 }
152 },
153
139 "owner": { 154 "owner": {
140 "module": "js/components/layout/tools-list.reel", 155 "module": "js/components/layout/tools-list.reel",
141 "name": "ToolsList", 156 "name": "ToolsList",
@@ -165,25 +180,7 @@
165 {"@": "repetition1"} 180 {"@": "repetition1"}
166 ] 181 ]
167 } 182 }
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 }
183 } 183 }
184
185
186
187 } 184 }
188 </script> 185 </script>