diff options
Diffstat (limited to 'js/panels')
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 5 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.html | 7 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.js | 1 | ||||
-rwxr-xr-x | js/panels/components-panel.reel/components-panel.js | 7 | ||||
-rw-r--r-- | js/panels/history-panel/history-item.reel/history-item.css | 0 | ||||
-rw-r--r-- | js/panels/history-panel/history-item.reel/history-item.html | 29 | ||||
-rw-r--r-- | js/panels/history-panel/history-item.reel/history-item.js | 32 | ||||
-rw-r--r-- | js/panels/history-panel/history.reel/history.css | 34 | ||||
-rw-r--r-- | js/panels/history-panel/history.reel/history.html | 106 | ||||
-rw-r--r-- | js/panels/history-panel/history.reel/history.js | 26 | ||||
-rwxr-xr-x | js/panels/properties.reel/properties.js | 5 |
11 files changed, 244 insertions, 8 deletions
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 33f9b3a7..613bef4b 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -125,7 +125,10 @@ exports.Panel = Montage.create(Component, { | |||
125 | require.async(this.modulePath) | 125 | require.async(this.modulePath) |
126 | .then(function(panelContent) { | 126 | .then(function(panelContent) { |
127 | var componentRequire = panelContent[that.moduleName]; | 127 | var componentRequire = panelContent[that.moduleName]; |
128 | that.panelContent.content = componentRequire.create(); | 128 | var componentInstance = componentRequire.create(); |
129 | |||
130 | componentInstance.ownerComponent = that.ownerComponent; | ||
131 | that.panelContent.content = componentInstance; | ||
129 | }) | 132 | }) |
130 | .end(); | 133 | .end(); |
131 | } | 134 | } |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index 1561f973..ef023f01 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html | |||
@@ -69,6 +69,13 @@ | |||
69 | } | 69 | } |
70 | }, | 70 | }, |
71 | 71 | ||
72 | "panel_6": { | ||
73 | "prototype": "js/panels/Panel.reel", | ||
74 | "properties": { | ||
75 | "element": {"#": "panel_6"} | ||
76 | } | ||
77 | }, | ||
78 | |||
72 | "owner": { | 79 | "owner": { |
73 | "module": "js/panels/PanelContainer.reel", | 80 | "module": "js/panels/PanelContainer.reel", |
74 | "name": "PanelContainer", | 81 | "name": "PanelContainer", |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index c40bbc21..8d1d6a5e 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js | |||
@@ -45,6 +45,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
45 | this['panel_'+i].minHeight= p.minHeight; | 45 | this['panel_'+i].minHeight= p.minHeight; |
46 | this['panel_'+i].maxHeight = p.maxHeight; | 46 | this['panel_'+i].maxHeight = p.maxHeight; |
47 | this['panel_'+i].flexible = p.flexible; | 47 | this['panel_'+i].flexible = p.flexible; |
48 | this['panel_'+i].collapsed = p.collapsed; | ||
48 | this['panel_'+i].modulePath = p.modulePath; | 49 | this['panel_'+i].modulePath = p.modulePath; |
49 | this['panel_'+i].moduleName = p.moduleName; | 50 | this['panel_'+i].moduleName = p.moduleName; |
50 | this['panel_'+i].disabled = true; | 51 | this['panel_'+i].disabled = true; |
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index acbf702f..79eac37b 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js | |||
@@ -8,7 +8,6 @@ var Montage = require("montage/core/core").Montage, | |||
8 | Component = require("montage/ui/component").Component, | 8 | Component = require("montage/ui/component").Component, |
9 | NJUtils = require("js/lib/NJUtils").NJUtils; | 9 | NJUtils = require("js/lib/NJUtils").NJUtils; |
10 | 10 | ||
11 | var treeControlModule = require("js/components/tree.reel"); | ||
12 | var PIData = require("js/data/pi/pi-data").PiData; | 11 | var PIData = require("js/data/pi/pi-data").PiData; |
13 | 12 | ||
14 | String.prototype.capitalizeFirstChar = function() { | 13 | String.prototype.capitalizeFirstChar = function() { |
@@ -286,9 +285,7 @@ exports.ComponentsPanel = Montage.create(Component, { | |||
286 | var styles = { | 285 | var styles = { |
287 | 'position': 'absolute', | 286 | 'position': 'absolute', |
288 | 'left' : that.dragPosition[0] + 'px', | 287 | 'left' : that.dragPosition[0] + 'px', |
289 | 'top' : that.dragPosition[1] + 'px', | 288 | 'top' : that.dragPosition[1] + 'px' |
290 | '-webkit-transform-style' : 'preserve-3d', | ||
291 | '-webkit-transform' : 'perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)' | ||
292 | }; | 289 | }; |
293 | 290 | ||
294 | var defaultStyles = component.defaultStyles; | 291 | var defaultStyles = component.defaultStyles; |
@@ -369,7 +366,7 @@ exports.ComponentsPanel = Montage.create(Component, { | |||
369 | break; | 366 | break; |
370 | case "textarea": | 367 | case "textarea": |
371 | el = NJUtils.makeNJElement("textarea", "TextArea", "component"); | 368 | el = NJUtils.makeNJElement("textarea", "TextArea", "component"); |
372 | el.elementModel.pi = "TextAreaPi"; | 369 | el.elementModel.pi = "TextareaPi"; |
373 | break; | 370 | break; |
374 | case "toggleButton": | 371 | case "toggleButton": |
375 | el = NJUtils.makeNJElement("button", "Toggle Button", "component"); | 372 | el = NJUtils.makeNJElement("button", "Toggle Button", "component"); |
diff --git a/js/panels/history-panel/history-item.reel/history-item.css b/js/panels/history-panel/history-item.reel/history-item.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.css | |||
diff --git a/js/panels/history-panel/history-item.reel/history-item.html b/js/panels/history-panel/history-item.reel/history-item.html new file mode 100644 index 00000000..2db27846 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.html | |||
@@ -0,0 +1,29 @@ | |||
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 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
10 | <link rel="stylesheet" type="text/css" href="history-item.css"> | ||
11 | |||
12 | <script type="text/montage-serialization"> | ||
13 | { | ||
14 | "owner": { | ||
15 | "prototype": "js/panels/history-panel/history-item.reel", | ||
16 | "properties": { | ||
17 | "element": {"#": "history_item"} | ||
18 | } | ||
19 | } | ||
20 | } | ||
21 | </script> | ||
22 | |||
23 | </head> | ||
24 | <body> | ||
25 | |||
26 | <li data-montage-id="history_item"></li> | ||
27 | |||
28 | </body> | ||
29 | </html> \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history-item.reel/history-item.js b/js/panels/history-panel/history-item.reel/history-item.js new file mode 100644 index 00000000..8a6e7654 --- /dev/null +++ b/js/panels/history-panel/history-item.reel/history-item.js | |||
@@ -0,0 +1,32 @@ | |||
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 | var Montage = require("montage/core/core").Montage, | ||
8 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.HistoryItem = Montage.create(Component, { | ||
11 | _title: { | ||
12 | value: null | ||
13 | }, | ||
14 | |||
15 | title: { | ||
16 | get: function() { | ||
17 | return this._title; | ||
18 | }, | ||
19 | set: function(value) { | ||
20 | if(value !== this._title) { | ||
21 | this._title = value; | ||
22 | this.needsDraw = true; | ||
23 | } | ||
24 | } | ||
25 | }, | ||
26 | |||
27 | draw: { | ||
28 | value: function() { | ||
29 | this.element.innerHTML = this.title; | ||
30 | } | ||
31 | } | ||
32 | }); \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history.reel/history.css b/js/panels/history-panel/history.reel/history.css new file mode 100644 index 00000000..44c4c74b --- /dev/null +++ b/js/panels/history-panel/history.reel/history.css | |||
@@ -0,0 +1,34 @@ | |||
1 | .history_panel { | ||
2 | height: 100%; | ||
3 | overflow: hidden; | ||
4 | } | ||
5 | |||
6 | .scroller { | ||
7 | position: absolute; | ||
8 | top: 0; | ||
9 | left: 0; | ||
10 | right: 0; | ||
11 | bottom: 0; | ||
12 | } | ||
13 | |||
14 | .history_panel ul { | ||
15 | padding: 0; | ||
16 | margin: 0; | ||
17 | } | ||
18 | |||
19 | .history_panel li { | ||
20 | padding: 10px 15px; | ||
21 | list-style: none; | ||
22 | } | ||
23 | |||
24 | .undo_list li { | ||
25 | background-color: hsl(0, 0%, 94%); | ||
26 | border-top: 1px solid hsl(0, 0%, 100%); | ||
27 | border-bottom: 1px solid hsl(0, 0%, 85%); | ||
28 | } | ||
29 | |||
30 | .redo_list li { | ||
31 | background-color: hsl(199, 71%, 79%); | ||
32 | border-top: 1px solid hsl(0, 0%, 100%); | ||
33 | border-bottom: 1px solid hsl(0, 0%, 85%); | ||
34 | } \ No newline at end of file | ||
diff --git a/js/panels/history-panel/history.reel/history.html b/js/panels/history-panel/history.reel/history.html new file mode 100644 index 00000000..f2e3c6ae --- /dev/null +++ b/js/panels/history-panel/history.reel/history.html | |||
@@ -0,0 +1,106 @@ | |||
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 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||