diff options
Diffstat (limited to 'js/panels/PanelContainer')
-rwxr-xr-x | js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html | 146 | ||||
-rwxr-xr-x | js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js | 180 |
2 files changed, 0 insertions, 326 deletions
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html deleted file mode 100755 index 76f6b9c4..00000000 --- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.html +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
5 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
6 | </copyright> --> | ||
7 | <html lang="en"> | ||
8 | <head> | ||
9 | |||
10 | <script type="text/montage-serialization"> | ||
11 | { | ||
12 | "panelData": { | ||
13 | "module": "js/data/panels-data", | ||
14 | "name": "PanelsData" | ||
15 | }, | ||
16 | |||
17 | "PanelController": { | ||
18 | "module": "montage/ui/controller/array-controller", | ||
19 | "name" : "ArrayController", | ||
20 | "properties": { | ||
21 | "automaticallyOrganizeObjects": true | ||
22 | }, | ||
23 | "bindings": { | ||
24 | "content": { | ||
25 | "boundObject": {"@": "owner"}, | ||
26 | "boundObjectPropertyPath": "panels", | ||
27 | "oneway": true | ||
28 | } | ||
29 | } | ||
30 | }, | ||
31 | |||
32 | "repetition1": { | ||
33 | "module": "montage/ui/repetition.reel", | ||
34 | "name": "Repetition", | ||
35 | "properties": { | ||
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" | ||
47 | }, | ||
48 | "bindings": { | ||
49 | "name": { | ||
50 | "boundObject": {"@": "repetition1"}, | ||
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", | ||
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 | ||
93 | } | ||
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 | ] | ||
109 | }, | ||
110 | |||
111 | "owner": { | ||
112 | "module": "js/panels/PanelContainer/PanelContainer.reel", | ||
113 | "name": "PanelContainer", | ||
114 | "properties": { | ||
115 | "element": {"#": "panelContainer"}, | ||
116 | "repeater": {"@": "repetition1"}, | ||
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 | ] | ||
134 | } | ||
135 | } | ||
136 | </script> | ||
137 | |||
138 | </head> | ||
139 | <body> | ||
140 | <section id="panelContainer"> | ||
141 | <article id="panels" class="panels"> | ||
142 | <article id="panel"></article> | ||
143 | </article> | ||
144 | </section> | ||
145 | </body> | ||
146 | </html> \ No newline at end of file | ||
diff --git a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js deleted file mode 100755 index 3a141b05..00000000 --- a/js/panels/PanelContainer/PanelContainer.reel/PanelContainer.js +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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. | ||
5 | </copyright> */ | ||
6 | |||
7 | /* | ||
8 | Panel Container - A container for other panels | ||
9 | */ | ||
10 | var Montage = require("montage/core/core").Montage; | ||
11 | var Component = require("montage/ui/component").Component; | ||
12 | |||
13 | exports.PanelContainer = Montage.create(Component, { | ||
14 | |||
15 | panelData: { | ||
16 | value: null | ||
17 | }, | ||
18 | |||
19 | panels: { | ||
20 | value: [] | ||
21 | }, | ||
22 | |||
23 | panelController: { | ||
24 | value: null | ||
25 | }, | ||
26 | |||
27 | currentPanelState: { | ||
28 | value: {} | ||
29 | }, | ||
30 | |||
31 | templateDidLoad: { | ||
32 | value: function() { | ||
33 | var pLen, storedData; | ||
34 | |||
35 | // Loop through the panels to add to the repetition and get the saved state | ||
36 | pLen = this.panelData.panels.length; | ||
37 | |||
38 | // Get the saved panel state | ||
39 | storedData = this.application.localStorage.getItem("panels"); | ||
40 | |||
41 | for(var i = 0; i < pLen; i++) { | ||
42 | |||
43 | var p = this.panelData.panels[i]; | ||
44 | |||
45 | this.currentPanelState[p.name] = {}; | ||
46 | this.currentPanelState.version = "1.0"; | ||
47 | |||
48 | if(storedData && storedData[p.name]) { | ||
49 | p.collapsed = storedData[p.name].collapsed; | ||
50 | } | ||
51 | |||
52 | this.currentPanelState[p.name].collapsed = p.collapsed; | ||
53 | |||
54 | this.panels.push(p); | ||
55 | } | ||
56 | |||
57 | this.application.localStorage.setItem("panels", this.currentPanelState); | ||
58 | } | ||
59 | }, | ||
60 | |||
61 | prepareForDraw: { | ||
62 | value: function() { |