diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/data/panels-data.js | 2 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.js | 15 | ||||
-rw-r--r-- | js/panels/binding-panel.reel/binding-panel.css (renamed from js/panels/binding.reel/binding.css) | 0 | ||||
-rw-r--r-- | js/panels/binding-panel.reel/binding-panel.html (renamed from js/panels/binding.reel/binding.html) | 5 | ||||
-rw-r--r-- | js/panels/binding-panel.reel/binding-panel.js | 12 | ||||
-rw-r--r-- | js/panels/binding.reel/binding.js | 11 | ||||
-rw-r--r-- | js/panels/objects.reel/objects.html | 1 |
7 files changed, 25 insertions, 21 deletions
diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 7fa22995..23bfa1ed 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js | |||
@@ -116,7 +116,7 @@ exports.PanelsData = Montage.create(Montage, { | |||
116 | collapsed: true, | 116 | collapsed: true, |
117 | scrollable: true, | 117 | scrollable: true, |
118 | open: true, | 118 | open: true, |
119 | modulePath: "js/panels/binding.reel", | 119 | modulePath: "js/panels/binding-panel.reel", |
120 | moduleName: "BindingPanel" | 120 | moduleName: "BindingPanel" |
121 | }, | 121 | }, |
122 | { | 122 | { |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index 044fd598..b4f77317 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js | |||
@@ -158,16 +158,17 @@ exports.PanelContainer = Montage.create(Component, { | |||
158 | 158 | ||
159 | _setPanelsSizes: { | 159 | _setPanelsSizes: { |
160 | value: function(panelActivated) { | 160 | value: function(panelActivated) { |
161 | this.panelsAvailable(); | 161 | var availablePanels = this.panelsAvailable(); |
162 | var len = this.panels.length, setLocked = true; | 162 | var len = availablePanels.length; |
163 | var setLocked = true; | ||
163 | 164 | ||
164 | for(var i = 0; i < len; i++) { | 165 | for(var i = 0; i < len; i++) { |
165 | if(this.panels[i] === panelActivated || panelActivated === null) { | 166 | if(availablePanels[i] === panelActivated || panelActivated === null) { |
166 | setLocked = false; | 167 | setLocked = false; |
167 | } | 168 | } |
168 | 169 | ||
169 | this.panels[i].locked = setLocked; | 170 | availablePanels[i].locked = setLocked; |
170 | this.panels[i].needsDraw = true; | 171 | availablePanels[i].needsDraw = true; |
171 | } | 172 | } |
172 | } | 173 | } |
173 | }, | 174 | }, |
@@ -176,7 +177,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
176 | value: function(panelActivated, unlockPanels) { | 177 | value: function(panelActivated, unlockPanels) { |
177 | var maxHeight = this.element.offsetHeight, setLocked = true; | 178 | var maxHeight = this.element.offsetHeight, setLocked = true; |
178 | var availablePanels = this.panelsAvailable(); | 179 | var availablePanels = this.panelsAvailable(); |
179 | var len = this.panels.length; | 180 | var len = availablePanels.length; |
180 | 181 | ||
181 | if(unlockPanels === true) { | 182 | if(unlockPanels === true) { |
182 | setLocked = false; | 183 | setLocked = false; |
@@ -190,7 +191,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
190 | } | 191 | } |
191 | 192 | ||
192 | for(var i = 0; i < len; i++) { | 193 | for(var i = 0; i < len; i++) { |
193 | var obj = this['panel_'+i]; | 194 | var obj = availablePanels[i]; |
194 | 195 | ||
195 | if(obj === panelActivated) { | 196 | if(obj === panelActivated) { |
196 | setLocked = false; | 197 | setLocked = false; |
diff --git a/js/panels/binding.reel/binding.css b/js/panels/binding-panel.reel/binding-panel.css index e69de29b..e69de29b 100644 --- a/js/panels/binding.reel/binding.css +++ b/js/panels/binding-panel.reel/binding-panel.css | |||
diff --git a/js/panels/binding.reel/binding.html b/js/panels/binding-panel.reel/binding-panel.html index 50e839ab..0db7b95f 100644 --- a/js/panels/binding.reel/binding.html +++ b/js/panels/binding-panel.reel/binding-panel.html | |||
@@ -7,11 +7,11 @@ | |||
7 | <html lang="en"> | 7 | <html lang="en"> |
8 | <head> | 8 | <head> |
9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | 9 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
10 | <link rel="stylesheet" href="binding.css" type="text/css"> | 10 | <link rel="stylesheet" href="binding-panel.css" type="text/css"> |
11 | <script type="text/montage-serialization"> | 11 | <script type="text/montage-serialization"> |
12 | { | 12 | { |
13 | "owner": { | 13 | "owner": { |
14 | "prototype": "js/panels/binding.reel", | 14 | "prototype": "js/panels/binding-panel.reel", |
15 | "properties": { | 15 | "properties": { |
16 | "element": {"#": "binding"} | 16 | "element": {"#": "binding"} |
17 | } | 17 | } |
@@ -22,6 +22,7 @@ | |||
22 | </head> | 22 | </head> |
23 | <body> | 23 | <body> |
24 | <div data-montage-id="binding"> | 24 | <div data-montage-id="binding"> |
25 | this is a test | ||
25 | </div> | 26 | </div> |
26 | </body> | 27 | </body> |
27 | </html> \ No newline at end of file | 28 | </html> \ No newline at end of file |
diff --git a/js/panels/binding-panel.reel/binding-panel.js b/js/panels/binding-panel.reel/binding-panel.js new file mode 100644 index 00000000..03fe5723 --- /dev/null +++ b/js/panels/binding-panel.reel/binding-panel.js | |||
@@ -0,0 +1,12 @@ | |||
1 | var Montage = require("montage/core/core").Montage, | ||
2 | Component = require("montage/ui/component").Component; | ||
3 | |||
4 | |||
5 | exports.BindingPanel = Montage.create(Component, { | ||
6 | |||
7 | prepareForDraw: { | ||
8 | value: function() { | ||
9 | console.log("test- objects"); | ||
10 | } | ||
11 | } | ||
12 | }); \ No newline at end of file | ||
diff --git a/js/panels/binding.reel/binding.js b/js/panels/binding.reel/binding.js deleted file mode 100644 index e9676c4d..00000000 --- a/js/panels/binding.reel/binding.js +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | var Montage = require("montage/core/core").Montage, | ||
2 | PanelBase = require("js/panels/panelbase").PanelBase; | ||
3 | //////////////////////////////////////////////////////////////////////// | ||
4 | //Exporting as ColorPanel | ||
5 | exports.BindingPanel = Montage.create(PanelBase, { | ||
6 | //////////////////////////////////////////////////////////////////// | ||
7 | //Panel Configuration | ||
8 | panelName: { | ||
9 | value: "Color" | ||
10 | } | ||
11 | }); \ No newline at end of file | ||
diff --git a/js/panels/objects.reel/objects.html b/js/panels/objects.reel/objects.html index b21097e7..a21e611c 100644 --- a/js/panels/objects.reel/objects.html +++ b/js/panels/objects.reel/objects.html | |||
@@ -22,6 +22,7 @@ | |||
22 | </head> | 22 | </head> |
23 | <body> | 23 | <body> |
24 | <div data-montage-id="objects"> | 24 | <div data-montage-id="objects"> |
25 | objects:test | ||
25 | </div> | 26 | </div> |
26 | </body> | 27 | </body> |
27 | </html> \ No newline at end of file | 28 | </html> \ No newline at end of file |