diff options
Diffstat (limited to 'js/panels/Components')
-rw-r--r-- | js/panels/Components/Components.xml | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | js/panels/Components/ComponentsPanel.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html | 39 | ||||
-rwxr-xr-x[-rw-r--r--] | js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | 423 |
5 files changed, 350 insertions, 140 deletions
diff --git a/js/panels/Components/Components.xml b/js/panels/Components/Components.xml deleted file mode 100644 index b3056330..00000000 --- a/js/panels/Components/Components.xml +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="ISO-8859-1"?> | ||
2 | <tree id="Components"> | ||
3 | <folder id="montageComponents" label="Montage Components"> | ||
4 | <leaf id="Button" label="Button" /> | ||
5 | <leaf id="Checkbox" label="Checkbox" /> | ||
6 | <leaf id="DynamicText" label="Dynamic Text" /> | ||
7 | <leaf id="FlowController" label="FlowController" /> | ||
8 | <leaf id="HotText" label="HotText" /> | ||
9 | <leaf id="HotTextUnit" label="HotTextUnit" /> | ||
10 | <leaf id="ImageContainer" label="Image Container" /> | ||
11 | <leaf id="Progress" label="Progress" /> | ||
12 | <leaf id="Scrollview" label="Scrollview" /> | ||
13 | <leaf id="Slider" label="Slider" /> | ||
14 | <leaf id="TextArea" label="TextArea" /> | ||
15 | <leaf id="Textfield" label="Textfield" /> | ||
16 | <leaf id="Toggle" label="Toggle" /> | ||
17 | </folder> | ||
18 | <folder id="metaComponents" label="Meta Components"> | ||
19 | <leaf id="Condition" label="Condition" /> | ||
20 | <leaf id="Repetition" label="Repetition" /> | ||
21 | <leaf id="Slot" label="Slot" /> | ||
22 | <leaf id="Substitution" label="Substitution" /> | ||
23 | </folder> | ||
24 | <folder id="htmlPresets" label="HTML Components"> | ||
25 | <leaf id="html_button" label="Button" /> | ||
26 | <leaf id="html_input" label="Text Input" /> | ||
27 | </folder> | ||
28 | </tree> \ No newline at end of file | ||
diff --git a/js/panels/Components/ComponentsPanel.js b/js/panels/Components/ComponentsPanel.js index df1d74bb..df1d74bb 100644..100755 --- a/js/panels/Components/ComponentsPanel.js +++ b/js/panels/Components/ComponentsPanel.js | |||
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css index ac250c83..ac250c83 100644..100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.css | |||
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html index df104ecc..6d7c8a2c 100644..100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.html | |||
@@ -15,8 +15,41 @@ | |||
15 | "module": "js/panels/Components/ComponentsPanelBase.reel", | 15 | "module": "js/panels/Components/ComponentsPanelBase.reel", |
16 | "name": "ComponentsPanelBase", | 16 | "name": "ComponentsPanelBase", |
17 | "properties": { | 17 | "properties": { |
18 | "element": {"#": "components_panel"} | 18 | "element": {"#": "components_panel"}, |
19 | "controller": {"@": "componentsTree"} | ||
19 | } | 20 | } |
21 | }, | ||
22 | |||
23 | "componentsController" : { | ||
24 | "module": "js/components/controllers/tree-controller", | ||
25 | "name": "TreeController", | ||
26 | "properties" : { | ||
27 | "branchKey" : "children", | ||
28 | "labelKey" : "text", | ||
29 | "delegate": {"@": "owner" } | ||
30 | }, | ||
31 | "bindings": { | ||
32 | "content": { | ||
33 | "boundObject": {"@": "owner"}, | ||
34 | "boundObjectPropertyPath": "components" | ||
35 | } | ||
36 | } | ||
37 | }, | ||
38 | |||
39 | "componentsTree" : { | ||
40 | "module" : "js/components/treeview/treeview.reel", | ||
41 | "name" : "Treeview", | ||
42 | "properties" : { | ||
43 | "element" : {"#": "componentsContainer"}, | ||
44 | "branchComponent" : {"@": "branch" }, | ||
45 | "contentController": {"@": "componentsController"}, | ||
46 | "showRoot" : false | ||
47 | } | ||
48 | }, | ||
49 | |||
50 | "branch" : { | ||
51 | "module" : "js/components/treeview/ninja-branch.reel", | ||
52 | "name" : "Branch" | ||
20 | } | 53 | } |
21 | } | 54 | } |
22 | </script> | 55 | </script> |
@@ -25,9 +58,7 @@ | |||
25 | <body> | 58 | <body> |
26 | 59 | ||
27 | <div id="components_panel" class="components_panel"> | 60 | <div id="components_panel" class="components_panel"> |
28 | <div class="treeHolder"> | 61 | <div id="componentsContainer"></div> |
29 | <ul id="comp_tree"></ul> | ||
30 | </div> | ||
31 | </div> | 62 | </div> |
32 | 63 | ||
33 | </body> | 64 | </body> |
diff --git a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js index 41afefa5..b4eec771 100644..100755 --- a/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js +++ b/js/panels/Components/ComponentsPanelBase.reel/ComponentsPanelBase.js | |||
@@ -4,142 +4,349 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
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 | var Montage = require("montage/core/core").Montage, | 7 | 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 | |||
11 | var treeControlModule = require("js/components/tree.reel"); | ||
12 | var PIData = require("js/data/pi/pi-data").PiData; | ||
13 | |||
14 | String.prototype.capitalizeFirstChar = function() { | ||
15 | return this.charAt(0).toUpperCase() + this.slice(1); | ||
16 | }; | ||
10 | 17 | ||
11 | var treeControlModule = require("js/components/tree.reel"); | ||
12 | 18 | ||
13 | var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component, { | 19 | var ComponentsPanelBase = exports.ComponentsPanelBase = Montage.create(Component, { |
14 | _hasFocus: { | 20 | |
15 | enumerable: false, | 21 | components: { |
16 | value: false | 22 | value: { |
23 | "text": "styles", | ||
24 | "children": [ | ||
25 | { | ||
26 | "text": "Montage Components", | ||
27 | "children": [ | ||
28 | { | ||
29 | "text": "Anchor", | ||
30 | "dataFile" : "node_modules/components-data/anchor.json", | ||
31 | "component": "anchor" | ||
32 | }, | ||
33 | { | ||
34 | "text": "Button", | ||
35 | "dataFile" : "node_modules/components-data/button.json", | ||
36 | "component": "button" | ||
37 | }, | ||
38 | { | ||
39 | "text": "Checkbox", | ||
40 | "dataFile" : "node_modules/components-data/checkbox.json", | ||
41 | "component": "checkbox" | ||
42 | }, | ||
43 | { | ||
44 | "text": "Image Component", | ||
45 | "dataFile" : "node_modules/components-data/image.json", | ||
46 | "component": "imageComponent" | ||
47 | }, | ||
48 | { | ||
49 | "text": "NumberInput", | ||
50 | "dataFile" : "node_modules/components-data/number-input.json", | ||
51 | "component": "numberInput" | ||
52 | }, | ||
53 | { | ||
54 | "text": "Select Input", | ||
55 | "dataFile" : "node_modules/components-data/select.json", | ||
56 | "component": "select" | ||
57 | }, | ||
58 | { | ||
59 | "text": "Radio Button", | ||
60 | "dataFile" : "node_modules/components-data/radio-button.json", | ||
61 | "component": "radioButton" | ||
62 | }, | ||
63 | { | ||
64 | "text": "Range Input", | ||
65 | "dataFile" : "node_modules/components-data/range-input.json", | ||
66 | "component": "rangeInput" | ||
67 | }, | ||
68 | { | ||
69 | "text": "TextArea", | ||
70 | "dataFile" : "node_modules/components-data/textarea.json", | ||
71 | "component": "textarea" | ||
72 | }, | ||
73 | { | ||
74 | "text": "Textfield", | ||
75 | "dataFile" : "node_modules/components-data/textfield.json", | ||
76 | "component": "textfield" | ||
77 | }, | ||
78 | { | ||
79 | "text": "Toogle Button", | ||
80 | "dataFile" : "node_modules/components-data/toggle-button.json", | ||
81 | "component": "toggleButton" | ||
82 | } | ||
83 | ] | ||
84 | } | ||
85 | ] | ||
86 | } | ||
87 | }, | ||
88 | |||
89 | componentsData: { | ||
90 | value: {} | ||
91 | }, | ||
92 | |||