aboutsummaryrefslogtreecommitdiff
path: root/js/panels/PanelContainer
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/PanelContainer')
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.html116
-rwxr-xr-xjs/panels/PanelContainer/PanelContainer.reel/PanelContainer.js432
2 files changed, 211 insertions, 337 deletions
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html
index 5c6ac227..76f6b9c4 100755
--- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html
+++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html
@@ -9,35 +9,103 @@
9 9
10 <script type="text/montage-serialization"> 10 <script type="text/montage-serialization">
11 { 11 {
12 "panel": { 12 "panelData": {
13 "module": "js/panels/Panel.reel", 13 "module": "js/data/panels-data",
14 "name": "Panel", 14 "name": "PanelsData"
15 },
16
17 "PanelController": {
18 "module": "montage/ui/controller/array-controller",
19 "name" : "ArrayController",
15 "properties": { 20 "properties": {
16 "element": {"#": "panel"} 21 "automaticallyOrganizeObjects": true
17 }, 22 },
18 "bindings": { 23 "bindings": {
19 "panelBase": { 24 "content": {
20 "boundObject": {"@": "repetition1"}, 25 "boundObject": {"@": "owner"},
21 "boundObjectPropertyPath": "objectAtCurrentIteration", 26 "boundObjectPropertyPath": "panels",
22 "oneway": true 27 "oneway": true
23 } 28 }
24 } 29 }
25 }, 30 },
26 31
27
28 "repetition1": { 32 "repetition1": {
29 "module": "montage/ui/repetition.reel", 33 "module": "montage/ui/repetition.reel",
30 "name": "Repetition", 34 "name": "Repetition",
31 "properties": { 35 "properties": {
32 "element": {"#": "panels"} 36 "element": {"#": "panels"},
37 "contentController": {"@" : "PanelController"}
38 }
39 },
40
41 "panel": {
42 "module": "js/panels/Panel.reel",
43 "name": "Panel",
44 "properties": {
45 "element": {"#": "panel"},
46 "identifier" : "panels"
33 }, 47 },
34 "bindings": { 48 "bindings": {
35 "objects": { 49 "name": {
36 "boundObject": {"@": "owner"}, 50 "boundObject": {"@": "repetition1"},
37 "boundObjectPropertyPath": "_panels", 51 "boundObjectPropertyPath": "objectAtCurrentIteration.name",
52 "oneway": true
53 },
54 "height": {
55 "boundObject": {"@": "repetition1"},
56 "boundObjectPropertyPath": "objectAtCurrentIteration.height",
57 "oneway": false
58 },
59 "minHeight": {
60 "boundObject": {"@": "repetition1"},
61 "boundObjectPropertyPath": "objectAtCurrentIteration.minHeight",
62 "oneway": true
63 },
64 "maxHeight": {
65 "boundObject": {"@": "repetition1"},
66 "boundObjectPropertyPath": "objectAtCurrentIteration.maxHeight",
67 "oneway": true
68 },
69 "flexible": {
70 "boundObject": {"@": "repetition1"},
71 "boundObjectPropertyPath": "objectAtCurrentIteration.flexible",
72 "oneway": true
73 },
74 "collapsed": {
75 "boundObject": {"@": "repetition1"},
76 "boundObjectPropertyPath": "objectAtCurrentIteration.collapsed",
77 "oneway": false
78 },
79 "modulePath": {
80 "boundObject": {"@": "repetition1"},
81 "boundObjectPropertyPath": "objectAtCurrentIteration.modulePath",
38 "oneway": true 82 "oneway": true
83 },
84 "moduleName": {
85 "boundObject": {"@": "repetition1"},
86 "boundObjectPropertyPath": "objectAtCurrentIteration.moduleName",
87 "oneway": true
88 },
89 "contentComponent": {
90 "boundObject": {"@": "repetition1"},
91 "boundObjectPropertyPath": "objectAtCurrentIteration.contentComponent",
92 "oneway": false
39 } 93 }
40 } 94 },
95 "listeners": [
96 {
97 "type": "resizeStart",
98 "listener": {"@": "owner"}
99 },
100 {
101 "type": "resizeMove",
102 "listener": {"@": "owner"}
103 },
104 {
105 "type": "resizeEnd",
106 "listener": {"@": "owner"}
107 }
108 ]
41 }, 109 },
42 110
43 "owner": { 111 "owner": {
@@ -45,8 +113,24 @@
45 "name": "PanelContainer", 113 "name": "PanelContainer",
46 "properties": { 114 "properties": {
47 "element": {"#": "panelContainer"}, 115 "element": {"#": "panelContainer"},
48 "repeater": {"@": "repetition1"} 116 "repeater": {"@": "repetition1"},
49 } 117 "panelData": {"@": "panelData" },
118 "panelController" : {"@" : "PanelController"}
119 },
120 "listeners": [
121 {
122 "type": "panelResizing",
123 "listener": {"@": "owner"}
124 },
125 {
126 "type": "action",
127 "listener": {"@": "owner"}
128 },
129 {
130 "type": "dropped",
131 "listener": {"@": "owner"}
132 }
133 ]
50 } 134 }
51 } 135 }
52 </script> 136 </script>
@@ -55,7 +139,7 @@
55<body> 139<body>
56 <section id="panelContainer"> 140 <section id="panelContainer">
57 <article id="panels" class="panels"> 141 <article id="panels" class="panels">
58 <article id="panel" class="panel"></article> 142 <article id="panel"></article>
59 </article> 143 </article>
60 </section> 144 </section>
61</body> 145</body>
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
index 3cbd4369..3a141b05 100755
--- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
+++ b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js
@@ -3,388 +3,178 @@ This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> 3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */ 5</copyright> */
6 6
7/* 7/*
8Panel Container - A container for other panels 8Panel Container - A container for other panels
9*/ 9*/
10var Montage = require("montage/core/core").Montage; 10var Montage = require("montage/core/core").Montage;
11var Component = require("montage/ui/component").Component; 11var Component = require("montage/ui/component").Component;
12var PropertiesPanel = require("js/panels/Properties/properties-panel").PropertiesPanel; 12
13var ColorPanel = require("js/panels/Color/ColorPanel").ColorPanel;
14var CSSPanel = require("js/panels/CSSPanel/CSSPanel").CSSPanel;
15var ComponentsPanel = require("js/panels/Components/ComponentsPanel").ComponentsPanel;
16var ProjectPanel = require("js/panels/Project/ProjectPanel").ProjectPanel;
17var MaterialsPanel = require("js/panels/Materials/MaterialsPanel").MaterialsPanel;
18var PresetsPanel = require("js/panels/presets/presets-panel").PresetsPanel;
19
20exports.PanelContainer = Montage.create(Component, { 13exports.PanelContainer = Montage.create(Component, {
21 lastOffset: {
22 value:null
23 },
24 _collapsedHeight: {
25 value: 26
26 },
27 _isFirstAdjustableNonCollapsed: {
28 value:true