diff options
author | Jose Antonio Marquez | 2012-06-27 10:49:24 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-27 10:49:24 -0700 |
commit | dfa8bfa14de3e60f5fc3797436f39c5b24e40592 (patch) | |
tree | fa24aa335248221bbdd13fb60b9c2463435166fa /js/panels/color/colorpanelpopup.reel | |
parent | e41615001f80edafb2ee329851dbbb94025f0eed (diff) | |
download | ninja-dfa8bfa14de3e60f5fc3797436f39c5b24e40592.tar.gz |
Adding no color support to popup in chips
Diffstat (limited to 'js/panels/color/colorpanelpopup.reel')
-rwxr-xr-x | js/panels/color/colorpanelpopup.reel/colorpanelpopup.js | 17 |
1 files changed, 5 insertions, 12 deletions
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, { | |||
32 | set: function(value) {if (value !== this._colorManager) this._colorManager = value;} | 32 | set: function(value) {if (value !== this._colorManager) this._colorManager = value;} |
33 | }, | 33 | }, |
34 | //////////////////////////////////////////////////////////////////// | 34 | //////////////////////////////////////////////////////////////////// |
35 | //Storing color panel | ||
36 | _colorPanel: { | ||
37 | value: false | ||
38 | }, | ||
39 | //////////////////////////////////////////////////////////////////// | ||
40 | //Color panel | ||
41 | colorPanel: { | ||
42 | get: function() {return this._colorPanel;}, | ||
43 | set: function(value) {this._colorPanel = value;} | ||
44 | }, | ||
45 | //////////////////////////////////////////////////////////////////// | ||
46 | // | 35 | // |
47 | _components: { | 36 | _components: { |
48 | value: null | 37 | value: null |
@@ -52,6 +41,10 @@ exports.ColorPanelPopup = Montage.create(Component, { | |||
52 | setNoColor: { | 41 | setNoColor: { |
53 | value: function (code) { | 42 | value: function (code) { |
54 | if (this.colorManager) this.colorManager.applyNoColor(code); | 43 | if (this.colorManager) this.colorManager.applyNoColor(code); |
44 | // | ||
45 | if (!code && !this.props.panel) { | ||
46 | this.dispatchEvent({type: 'change', wasSetByCode: code, mode: 'nocolor', value: null}); | ||
47 | } | ||
55 | } | 48 | } |
56 | }, | 49 | }, |
57 | //////////////////////////////////////////////////////////////////// | 50 | //////////////////////////////////////////////////////////////////// |
@@ -161,7 +154,7 @@ exports.ColorPanelPopup = Montage.create(Component, { | |||
161 | if (!this.props || (this.props && this.props.nocolor)) { | 154 | if (!this.props || (this.props && this.props.nocolor)) { |
162 | // | 155 | // |
163 | this.btnNocolor.addEventListener('click', function () { | 156 | this.btnNocolor.addEventListener('click', function () { |
164 | this.setNoColor(); | 157 | this.setNoColor(false); |
165 | }.bind(this), true); | 158 | }.bind(this), true); |
166 | } else { | 159 | } else { |
167 | this.btnNocolor.style.display = 'none'; | 160 | this.btnNocolor.style.display = 'none'; |