diff options
Diffstat (limited to 'js/components/layout/document-bar.reel')
-rwxr-xr-x | js/components/layout/document-bar.reel/document-bar.html | 26 | ||||
-rwxr-xr-x | js/components/layout/document-bar.reel/document-bar.js | 10 |
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 | } |