From dfa8bfa14de3e60f5fc3797436f39c5b24e40592 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 27 Jun 2012 10:49:24 -0700 Subject: Adding no color support to popup in chips --- js/panels/color/colorpanelpopup.reel/colorpanelpopup.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'js/panels/color/colorpanelpopup.reel/colorpanelpopup.js') diff --git a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js index 3eb6eec6..4a868a6d 100755 --- a/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js +++ b/js/panels/color/colorpanelpopup.reel/colorpanelpopup.js @@ -32,17 +32,6 @@ exports.ColorPanelPopup = Montage.create(Component, { set: function(value) {if (value !== this._colorManager) this._colorManager = value;} }, //////////////////////////////////////////////////////////////////// - //Storing color panel - _colorPanel: { - value: false - }, - //////////////////////////////////////////////////////////////////// - //Color panel - colorPanel: { - get: function() {return this._colorPanel;}, - set: function(value) {this._colorPanel = value;} - }, - //////////////////////////////////////////////////////////////////// // _components: { value: null @@ -52,6 +41,10 @@ exports.ColorPanelPopup = Montage.create(Component, { setNoColor: { value: function (code) { if (this.colorManager) this.colorManager.applyNoColor(code); + // + if (!code && !this.props.panel) { + this.dispatchEvent({type: 'change', wasSetByCode: code, mode: 'nocolor', value: null}); + } } }, //////////////////////////////////////////////////////////////////// @@ -161,7 +154,7 @@ exports.ColorPanelPopup = Montage.create(Component, { if (!this.props || (this.props && this.props.nocolor)) { // this.btnNocolor.addEventListener('click', function () { - this.setNoColor(); + this.setNoColor(false); }.bind(this), true); } else { this.btnNocolor.style.display = 'none'; -- cgit v1.2.3