From 6dfe2e62b1d7a71daf097aac3a31213d564e6122 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 16 May 2012 00:54:30 -0700 Subject: Removing the old checkbox components. Created a new LabelCheckbox Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/sections/custom.reel/custom.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js') diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 876fe110..3ab32888 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; var Dropdown = require("js/components/combobox.reel").Combobox; var TextField = require("js/components/textfield.reel").TextField; var FileInput = require("js/components/ui/file-input.reel").FileInput; -var Checkbox = require("js/components/checkbox.reel").Checkbox; +var LabelCheckbox = require("js/components/ui/label-checkbox.reel").LabelCheckbox; var ColorChip = require("js/components/ui/color-chip.reel").ColorChip; var Button = require("montage/ui/button.reel").Button; @@ -77,7 +77,7 @@ exports.CustomSection = Montage.create(Component, { this.rows.push(tmpRow); } else if(this._fields[i].length === 3) { - + } } @@ -103,7 +103,7 @@ exports.CustomSection = Montage.create(Component, { handleChange: { value:function(event) { if(event._event.wasSetByCode) return; - + var obj = event.currentTarget; this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj}); } @@ -349,7 +349,7 @@ exports.CustomSection = Montage.create(Component, { value: function(aField) { // Generate Textfield - var obj = Checkbox.create(); + var obj = LabelCheckbox.create(); // Set Values for TextField if (aField.id) obj.id = aField.id; -- cgit v1.2.3 From 65cea92d839bcd25ea9094a0798190a4dc4bea35 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 17 May 2012 00:16:43 -0700 Subject: Adding a disabled property to the label-checkbox. Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/sections/custom.reel/custom.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js') diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 3ab32888..49b4414e 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -262,10 +262,10 @@ exports.CustomSection = Montage.create(Component, { if(aField.enabled.boundObject) { // TODO - For now, always bind to this.controls[someProperty] Object.defineBinding(obj, "enabled", { - boundObject: this.controls, - boundObjectPropertyPath: aField.enabled.boundProperty, - oneway: false - }); + boundObject: this.controls, + boundObjectPropertyPath: aField.enabled.boundProperty, + oneway: false + }); } else { obj.enabled = aField.enabled; } -- cgit v1.2.3 From a341522e3603c18ab3b93defa894e3be702dd0f4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 22 May 2012 17:45:35 -0700 Subject: fixing the undefined 'color' issue Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/sections/custom.reel/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js') diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index 49b4414e..b1fd910d 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -400,7 +400,7 @@ exports.CustomSection = Montage.create(Component, { this.controls[aField.id] = obj; // TODO - Hack for now to reference the color select object to unregister color chips - this.controls["stageBackground"] = obj; + this.controls["background"] = obj; return obj; } -- cgit v1.2.3 From 5914c5b2209c4b8daac4249bb76cda5c9314c4e6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 24 May 2012 00:07:23 -0700 Subject: Cleaning up referencing to 'documentRoot' and '_document' Moved to reference new model in DOM architecture rework. This should not affect anything, just moving the references, and also the setting to the render methods in the design view. --- js/panels/properties.reel/sections/custom.reel/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/properties.reel/sections/custom.reel/custom.js') diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index b1fd910d..ae408f11 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -116,7 +116,7 @@ exports.CustomSection = Montage.create(Component, { value: function(event) { // Change the stage color for now //console.log(this, event); - ElementsMediator.setProperty([this.application.ninja.currentDocument.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); /* var propEvent = document.createEvent("CustomEvent"); propEvent.initEvent("propertyChange", true, true); -- cgit v1.2.3