diff options
author | Jose Antonio Marquez | 2012-04-24 10:06:53 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-24 10:06:53 -0700 |
commit | 4c15e77bdb7f4e0558f3749994a8a37b207b97ae (patch) | |
tree | 593ab4917fb5cc3ef8ee36822b56c6edd30c33a5 /js/panels | |
parent | 36d50b6599ab98559c76e1fe57b1bb131c4433da (diff) | |
parent | 55e6d621b9555abac06ab4adff44dfe29a78ec4e (diff) | |
download | ninja-4c15e77bdb7f4e0558f3749994a8a37b207b97ae.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/panels')
-rwxr-xr-x | js/panels/Panel.reel/Panel.js | 5 | ||||
-rwxr-xr-x | js/panels/PanelContainer.reel/PanelContainer.html | 11 | ||||
-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 | 10 |
11 files changed, 250 insertions, 11 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 251e86e4..d3673105 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html | |||
@@ -62,6 +62,13 @@ | |||
62 | } | 62 | } |
63 | }, | 63 | }, |
64 | 64 | ||
65 | "panel_6": { | ||
66 | "prototype": "js/panels/Panel.reel", | ||
67 | "properties": { | ||
68 | "element": {"#": "panel_6"} | ||
69 | } | ||
70 | }, | ||
71 | |||
65 | "owner": { | 72 | "owner": { |
66 | "module": "js/panels/PanelContainer.reel", | 73 | "module": "js/panels/PanelContainer.reel", |
67 | "name": "PanelContainer", | 74 | "name": "PanelContainer", |
@@ -74,7 +81,8 @@ | |||
74 | "panel_2": {"@": "panel_2"}, | 81 | "panel_2": {"@": "panel_2"}, |
75 | "panel_3": {"@": "panel_3"}, | 82 | "panel_3": {"@": "panel_3"}, |
76 | "panel_4": {"@": "panel_4"}, | 83 | "panel_4": {"@": "panel_4"}, |
77 | "panel_5": {"@": "panel_5"} | 84 | "panel_5": {"@": "panel_5"}, |
85 | "panel_6": {"@": "panel_6"} | ||
78 | }, | 86 | }, |
79 | "listeners": [ | 87 | "listeners": [ |
80 | { | 88 | { |
@@ -104,6 +112,7 @@ | |||
104 | <article data-montage-id="panel_3"></article> | 112 | <article data-montage-id="panel_3"></article> |
105 | <article data-montage-id="panel_4"></article> | 113 | <article data-montage-id="panel_4"></article> |
106 | <article data-montage-id="panel_5"></article> | 114 | <article data-montage-id="panel_5"></article> |
115 | <article data-montage-id="panel_6"></article> | ||
107 | </article> | 116 | </article> |
108 | </section> | 117 | </section> |
109 | </body> | 118 | </body> |
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 | } | ||