aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-18 17:12:53 -0700
committerNivesh Rajbhandari2012-05-18 17:12:53 -0700
commit8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50 (patch)
tree345d582d72c2064e6e4ebbd23cbb7bb6c81e96df /js/components/ui
parentca70f18a62a2a2b5670be132361e3a3f5907d920 (diff)
parente7c288fe8f5d3a9e5c9f0eb0a045c6c195a0e7b8 (diff)
downloadninja-8a15ac2b4a7d528d04c73bf6d9c6e724d8c6ac50.tar.gz
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'js/components/ui')
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js13
1 files changed, 11 insertions, 2 deletions
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, {
33 value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'} 33 value: {r:0, g:0, b:0, a:1, css:'rgb(0,0,0)', mode:'rgb'}
34 }, 34 },
35 35
36 chipBtn: {
37 serializable: true,
38 value: null
39 },
40
36 changeDelegate: { 41 changeDelegate: {
37 value: function(event) { 42 value: function(event) {
38 this.color = event._event.color; 43 this.color = event._event.color;
@@ -60,7 +65,7 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
60 this.icon.style.display = "none"; 65 this.icon.style.display = "none";
61 } 66 }
62 67
63 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; 68 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, nocolor: true, offset: this.offset};
64 this.application.ninja.colorController.addButton(this.mode, this.chipBtn); 69 this.application.ninja.colorController.addButton(this.mode, this.chipBtn);
65 70
66 } 71 }
@@ -80,9 +85,13 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
80 b = colorObj.value.b; 85 b = colorObj.value.b;
81 a = colorObj.value.a; 86 a = colorObj.value.a;
82 css = colorObj.css; 87 css = colorObj.css;
88 this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css});
89 } else {
90 mode = "nocolor";
91 this.chipBtn.color(mode, null);
92
83 } 93 }
84 94
85 this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css});
86 this.chipBtn.addEventListener("change", this, false); 95 this.chipBtn.addEventListener("change", this, false);
87 } 96 }
88 } 97 }