diff options
author | Valerio Virgillito | 2012-05-29 00:34:40 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-05-29 00:34:40 -0700 |
commit | 4c3aac5eabd93052b1554a03d78235215bb49db4 (patch) | |
tree | fe08f4f6d33d81d602f56daeaec845577fb9d8a5 /js/panels/Panel.reel | |
parent | 9a66ccad0235484643ef6d821315b11b5be4a93e (diff) | |
download | ninja-4c3aac5eabd93052b1554a03d78235215bb49db4.tar.gz |
document bindings phase 1
- using array controller to bind the current document to all ninja components
- removed open document event
- removed references to the document controller
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels/Panel.reel')
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 613bef4b..14b25c36 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -100,6 +100,30 @@ exports.Panel = Montage.create(Component, { | |||
100 | } | 100 | } |
101 | }, | 101 | }, |
102 | 102 | ||
103 | _currentDocument: { | ||
104 | value : null, | ||
105 | enumerable : false | ||
106 | }, | ||
107 | |||
108 | currentDocument : { | ||
109 | get : function() { | ||
110 | return this._currentDocument; | ||
111 | }, | ||
112 | set : function(value) { | ||
113 | if (value === this._currentDocument) { | ||
114 | return; | ||
115 | } | ||
116 | |||
117 | this._currentDocument = value; | ||
118 | |||
119 | if(typeof this.panelContent.content[0].controller._currentDocument !== "undefined") { | ||
120 | this.panelContent.content[0].controller.currentDocument = this._currentDocument; | ||
121 | } | ||
122 | |||
123 | this.disabled = this._currentDocument.currentView !== "design"; | ||
124 | } | ||
125 | }, | ||
126 | |||
103 | handleBtnCollapseAction: { | 127 | handleBtnCollapseAction: { |
104 | value: function() { | 128 | value: function() { |
105 | this.collapsed = !this.collapsed; | 129 | this.collapsed = !this.collapsed; |