From a396caf12a9e1fc84b984d39f8e671c335d2f5d5 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 18 May 2012 14:36:53 -0700 Subject: File Input control in materials panel was not working because of the change from id to data-montage-id. Signed-off-by: Nivesh Rajbhandari --- js/components/ui/file-input.reel/file-input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/ui') diff --git a/js/components/ui/file-input.reel/file-input.js b/js/components/ui/file-input.reel/file-input.js index b57f7c21..584380ec 100755 --- a/js/components/ui/file-input.reel/file-input.js +++ b/js/components/ui/file-input.reel/file-input.js @@ -38,7 +38,7 @@ var FileInput = exports.FileInput = Montage.create(Component, { { value:function(event) { - if(event.currentTarget.id === "fileInputControl") + if(event.currentTarget.type === "file") { this.filePath = this.inputField.value; } -- cgit v1.2.3 From 3e22b0940bb7752e292e485d8a393f215cae05de Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 18 May 2012 15:14:36 -0700 Subject: Fixed Materials Popup to work with new changes to repetition bindings. Signed-off-by: Nivesh Rajbhandari --- js/components/ui/input-group.reel/input-group.html | 3 ++- js/components/ui/property-control.reel/property-control.js | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'js/components/ui') diff --git a/js/components/ui/input-group.reel/input-group.html b/js/components/ui/input-group.reel/input-group.html index ba85c089..7da4a855 100755 --- a/js/components/ui/input-group.reel/input-group.html +++ b/js/components/ui/input-group.reel/input-group.html @@ -25,7 +25,8 @@ "bindings": { "data": { "boundObject": {"@": "propList"}, - "boundObjectPropertyPath": "objectAtCurrentIteration" + "boundObjectPropertyPath": "objectAtCurrentIteration", + "oneway": true } }, "listeners": [ diff --git a/js/components/ui/property-control.reel/property-control.js b/js/components/ui/property-control.reel/property-control.js index c28979a9..20ec173e 100755 --- a/js/components/ui/property-control.reel/property-control.js +++ b/js/components/ui/property-control.reel/property-control.js @@ -120,8 +120,13 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { set: function (data) { if (data !== this._data) { this._data = data; - this.label = data.label; - this.controlType = data.controlType; + if(data) { + this._label = data.label; + this._controlType = data.controlType; + } else { + this._label = ""; + this._controlType = null; + } this.needsDraw = true; } } @@ -143,6 +148,9 @@ var PropertyControl = exports.PropertyControl = Montage.create(Component, { { value:function(event) { + if(event.wasSetByCode) { + return; + } this._dispatchPropEvent(event); } }, -- cgit v1.2.3 From fdfba499f0b84360b96096fa866a981e96e8756c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 18 May 2012 16:35:56 -0700 Subject: fixing the color chip for the document root Signed-off-by: Valerio Virgillito --- js/components/ui/color-chip.reel/color-chip.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'js/components/ui') diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js index 4e64b2e8..630dcd4b 100755 --- a/js/components/ui/color-chip.reel/color-chip.js +++ b/js/components/ui/color-chip.reel/color-chip.js @@ -33,6 +33,11 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'} }, + chipBtn: { + serializable: true, + value: null + }, + changeDelegate: { value: function(event) { this.color = event._event.color; @@ -60,7 +65,7 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { this.icon.style.display = "none"; } - this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; + this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, nocolor: true, offset: this.offset}; this.application.ninja.colorController.addButton(this.mode, this.chipBtn); } @@ -80,9 +85,13 @@ var ColorChip = exports.ColorChip = Montage.create(Component, { b = colorObj.value.b; a = colorObj.value.a; css = colorObj.css; + this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css}); + } else { + mode = "nocolor"; + this.chipBtn.color(mode, null); + } - this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css}); this.chipBtn.addEventListener("change", this, false); } } -- cgit v1.2.3