aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-25 13:34:04 -0700
committerNivesh Rajbhandari2012-04-25 13:34:04 -0700
commit32a24988add5ba0ecf80caa31871cdd90e3eea5b (patch)
treefbf05f2dfc91e57ab9598046ff16798ea0ae1966 /js/panels
parent60d6346a78fb5257eaf36f17a5fcb764a342c012 (diff)
parentd3a6350163ada5644d34ed8d5c2a00cef4db2afc (diff)
downloadninja-32a24988add5ba0ecf80caa31871cdd90e3eea5b.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/Panel.reel/Panel.js5
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html11
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js1
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js7
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.css0
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.html29
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.js32
-rw-r--r--js/panels/history-panel/history.reel/history.css34
-rw-r--r--js/panels/history-panel/history.reel/history.html106
-rw-r--r--js/panels/history-panel/history.reel/history.js26
-rwxr-xr-xjs/panels/properties.reel/properties.js10
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
11var treeControlModule = require("js/components/tree.reel");
12var PIData = require("js/data/pi/pi-data").PiData; 11var PIData = require("js/data/pi/pi-data").PiData;
13 12
14String.prototype.capitalizeFirstChar = function() { 13String.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>
2This 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/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10exports.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}