diff options
author | Jose Antonio Marquez | 2012-02-23 10:38:51 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-23 10:38:51 -0800 |
commit | d764428023d87446fbbb153d8e04a23b900d71d5 (patch) | |
tree | 2581815db5567b52d4c59663ea9e37d6df057ca3 /js/components/ui/property-control.reel | |
parent | 3e1be6d4d4f0d3a2474af7d915954f9b6464fe2e (diff) | |
parent | cc295dd0fb873505eed01c232bd987cf6e2dcdd9 (diff) | |
download | ninja-d764428023d87446fbbb153d8e04a23b900d71d5.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into Color
Diffstat (limited to 'js/components/ui/property-control.reel')
-rwxr-xr-x | js/components/ui/property-control.reel/property-control.html | 6 | ||||
-rwxr-xr-x | js/components/ui/property-control.reel/property-control.js | 27 |
2 files changed, 17 insertions, 16 deletions
diff --git a/js/components/ui/property-control.reel/property-control.html b/js/components/ui/property-control.reel/property-control.html index 2e7c7b53..43e8e67f 100755 --- a/js/components/ui/property-control.reel/property-control.html +++ b/js/components/ui/property-control.reel/property-control.html | |||
@@ -11,14 +11,14 @@ | |||
11 | <script type="text/montage-serialization"> | 11 | <script type="text/montage-serialization"> |
12 | { | 12 | { |
13 | "substitution1": { | 13 | "substitution1": { |
14 | "module": "montage/ui/substitution", | 14 | "module": "montage/ui/substitution.reel", |
15 | "name": "Substitution", | 15 | "name": "Substitution", |
16 | "properties": { | 16 | "properties": { |
17 | "element": {"#": "propController"} | 17 | "element": {"#": "propController"} |
18 | } | 18 | } |
19 | }, | 19 | }, |
20 | "owner": { | 20 | "owner": { |
21 | "module": "js/components/ui/property-control", | 21 | "module": "js/components/ui/property-control.reel", |
22 | "name": "PropertyControl", | 22 | "name": "PropertyControl", |
23 | "properties": { | 23 | "properties": { |
24 | "element": {"#": "propControl"}, | 24 | "element": {"#": "propControl"}, |
@@ -30,7 +30,7 @@ | |||
30 | </script> | 30 | </script> |
31 | </head> | 31 | </head> |
32 | <body> | 32 | <body> |
33 | <div id="propControl"> | 33 | <div id="propControl" class="propControl"> |
34 | <div id="propLabel" class="prop-label"></div> | 34 | <div id="propLabel" class="prop-label"></div> |
35 | <div id="propController" class="prop-controller"> | 35 | <div id="propController" class="prop-controller"> |
36 | <div id="subDummy"></div> | 36 | <div id="subDummy"></div> |
diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js index 586d2e9a..58b1be9f 100755 --- a/js/components/ui/property-control.reel/property-control.js +++ b/js/components/ui/property-control.reel/property-control.js | |||
@@ -6,16 +6,16 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
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 | HotText = require("js/components/hottext").HotText, | 9 | HotText = require("js/components/hottext.reel").HotText, |
10 | HotTextUnit = require("js/components/hottextunit").HotTextUnit, | 10 | HotTextUnit = require("js/components/hottextunit.reel").HotTextUnit, |
11 | Slider = require("js/components/slider").Slider, | 11 | Slider = require("js/components/slider.reel").Slider, |
12 | Button = require("js/components/button").Button, | 12 | Button = require("js/components/button.reel").Button, |
13 | Checkbox = require("js/components/checkbox").Checkbox, | 13 | Checkbox = require("js/components/checkbox.reel").Checkbox, |
14 | Combobox = require("js/components/combobox").Combobox, | 14 | Combobox = require("js/components/combobox.reel").Combobox, |
15 | TextField = require("js/components/TextField").TextField, | 15 | TextField = require("js/components/TextField.reel").TextField, |
16 | ColorChip = require("js/components/ui/color-chip").ColorChip, | 16 | ColorChip = require("js/components/ui/color-chip.reel").ColorChip, |
17 | FileInput = require("js/components/ui/file-input").FileInput, | 17 | FileInput = require("js/components/ui/file-input.reel").FileInput, |
18 | InputGroup = require("js/components/ui/input-group").InputGroup; | 18 | InputGroup = require("js/components/ui/input-group.reel").InputGroup; |
19 | 19 | ||
20 | var PropertyControl = exports.PropertyControl = Montage.create(Component, { | 20 | var PropertyControl = exports.PropertyControl = Montage.create(Component, { |
21 | 21 | ||
@@ -134,7 +134,7 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
134 | { | 134 | { |
135 | this._control[n] = defaults[n]; | 135 | this._control[n] = defaults[n]; |
136 | } | 136 | } |
137 | 137 | this._labelField.innerHTML = this._label; | |
138 | this._control.needsDraw = true; | 138 | this._control.needsDraw = true; |
139 | } | 139 | } |
140 | }, | 140 | }, |
@@ -170,8 +170,6 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
170 | 170 | ||
171 | prepareForDraw: { | 171 | prepareForDraw: { |
172 | value: function() { | 172 | value: function() { |
173 | this._labelField.innerHTML = this._label; | ||
174 | |||
175 | switch(this._controlType) | 173 | switch(this._controlType) |
176 | { | 174 | { |
177 | case "HotText": | 175 | case "HotText": |
@@ -199,6 +197,9 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { | |||
199 | break; | 197 | break; |
200 | case "ColorChip": | 198 | case "ColorChip": |
201 | this._control = ColorChip.create(); | 199 | this._control = ColorChip.create(); |
200 | this._control.chip = true; | ||
201 | this._control.hasIcon = false; | ||
202 | this._control.mode = "chip"; | ||
202 | this._control.addEventListener("change", this, false); | 203 | this._control.addEventListener("change", this, false); |
203 | this._prop = "color"; | 204 | this._prop = "color"; |
204 | break; | 205 | break; |