diff options
author | hwc487 | 2012-05-31 17:11:08 -0700 |
---|---|---|
committer | hwc487 | 2012-05-31 17:11:08 -0700 |
commit | 1c445cf5d905f79937998cf2f1115594ea8c1074 (patch) | |
tree | 35271ad7ffec86fde9102af3dd954fa3a2974582 /js/panels/properties.reel/sections/custom.reel/custom.js | |
parent | 335ce503996e3ccbd2909086328d0a31fbd03370 (diff) | |
parent | 6042bdc5f2aada4412912fd01602d32c9088dc26 (diff) | |
download | ninja-1c445cf5d905f79937998cf2f1115594ea8c1074.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/io/system/ninjalibrary.json
Diffstat (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js')
-rwxr-xr-x | js/panels/properties.reel/sections/custom.reel/custom.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 876fe110..ae408f11 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js | |||
@@ -19,7 +19,7 @@ var HT = require("js/components/hottext.reel").HotText; | |||
19 | var Dropdown = require("js/components/combobox.reel").Combobox; | 19 | var Dropdown = require("js/components/combobox.reel").Combobox; |
20 | var TextField = require("js/components/textfield.reel").TextField; | 20 | var TextField = require("js/components/textfield.reel").TextField; |
21 | var FileInput = require("js/components/ui/file-input.reel").FileInput; | 21 | var FileInput = require("js/components/ui/file-input.reel").FileInput; |
22 | var Checkbox = require("js/components/checkbox.reel").Checkbox; | 22 | var LabelCheckbox = require("js/components/ui/label-checkbox.reel").LabelCheckbox; |
23 | var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; | 23 | var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; |
24 | var Button = require("montage/ui/button.reel").Button; | 24 | var Button = require("montage/ui/button.reel").Button; |
25 | 25 | ||
@@ -77,7 +77,7 @@ exports.CustomSection = Montage.create(Component, { | |||
77 | this.rows.push(tmpRow); | 77 | this.rows.push(tmpRow); |
78 | 78 | ||
79 | } else if(this._fields[i].length === 3) { | 79 | } else if(this._fields[i].length === 3) { |
80 | 80 | ||
81 | } | 81 | } |
82 | 82 | ||
83 | } | 83 | } |
@@ -103,7 +103,7 @@ exports.CustomSection = Montage.create(Component, { | |||
103 | handleChange: { | 103 | handleChange: { |
104 | value:function(event) { | 104 | value:function(event) { |
105 | if(event._event.wasSetByCode) return; | 105 | if(event._event.wasSetByCode) return; |
106 | 106 | ||
107 | var obj = event.currentTarget; | 107 | var obj = event.currentTarget; |
108 | this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); | 108 | this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); |
109 | } | 109 | } |
@@ -116,7 +116,7 @@ exports.CustomSection = Montage.create(Component, { | |||
116 | value: function(event) { | 116 | value: function(event) { |
117 | // Change the stage color for now | 117 | // Change the stage color for now |
118 | //console.log(this, event); | 118 | //console.log(this, event); |
119 | ElementsMediator.setProperty([this.application.ninja.currentDocument.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); | 119 | ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); |
120 | /* | 120 | /* |
121 | var propEvent = document.createEvent("CustomEvent"); | 121 | var propEvent = document.createEvent("CustomEvent"); |
122 | propEvent.initEvent("propertyChange", true, true); | 122 | propEvent.initEvent("propertyChange", true, true); |
@@ -262,10 +262,10 @@ exports.CustomSection = Montage.create(Component, { | |||
262 | if(aField.enabled.boundObject) { | 262 | if(aField.enabled.boundObject) { |
263 | // TODO - For now, always bind to this.controls[someProperty] | 263 | // TODO - For now, always bind to this.controls[someProperty] |
264 | Object.defineBinding(obj, "enabled", { | 264 | Object.defineBinding(obj, "enabled", { |
265 | boundObject: this.controls, | 265 | boundObject: this.controls, |
266 | boundObjectPropertyPath: aField.enabled.boundProperty, | 266 | boundObjectPropertyPath: aField.enabled.boundProperty, |
267 | oneway: false | 267 | oneway: false |
268 | }); | 268 | }); |
269 | } else { | 269 | } else { |
270 | obj.enabled = aField.enabled; | 270 | obj.enabled = aField.enabled; |
271 | } | 271 | } |
@@ -349,7 +349,7 @@ exports.CustomSection = Montage.create(Component, { | |||
349 | value: function(aField) { | 349 | value: function(aField) { |
350 | 350 | ||
351 | // Generate Textfield | 351 | // Generate Textfield |
352 | var obj = Checkbox.create(); | 352 | var obj = LabelCheckbox.create(); |
353 | 353 | ||
354 | // Set Values for TextField | 354 | // Set Values for TextField |
355 | if (aField.id) obj.id = aField.id; | 355 | if (aField.id) obj.id = aField.id; |
@@ -400,7 +400,7 @@ exports.CustomSection = Montage.create(Component, { | |||
400 | this.controls[aField.id] = obj; | 400 | this.controls[aField.id] = obj; |
401 | 401 | ||
402 | // TODO - Hack for now to reference the color select object to unregister color chips | 402 | // TODO - Hack for now to reference the color select object to unregister color chips |
403 | this.controls["stageBackground"] = obj; | 403 | this.controls["background"] = obj; |
404 | 404 | ||
405 | return obj; | 405 | return obj; |
406 | } | 406 | } |