aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/color-chip.reel
diff options
context:
space:
mode:
authorAnanya Sen2012-05-31 10:13:40 -0700
committerAnanya Sen2012-05-31 10:13:40 -0700
commit286457b4f23974277274ba388afd283e8aa085cb (patch)
treec21bf791e7c4f572d12f97987ea6b89e74da67fe /js/components/ui/color-chip.reel
parent4d9b481c58090e8f1fc7b0e9d73a81b0f49cccc8 (diff)
parentd49c909cff7f0c5e5d0b127ad84a2fefc6677dc6 (diff)
downloadninja-286457b4f23974277274ba388afd283e8aa085cb.tar.gz
Merge branch 'refs/heads/ninja-internal-master' into cut-copy-paste
Conflicts: js/controllers/styles-controller.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/ui/color-chip.reel')
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.css10
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js13
2 files changed, 11 insertions, 12 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.css b/js/components/ui/color-chip.reel/color-chip.css
index da75c41e..7c7135a2 100755
--- a/js/components/ui/color-chip.reel/color-chip.css
+++ b/js/components/ui/color-chip.reel/color-chip.css
@@ -19,13 +19,3 @@
19 padding: 0; 19 padding: 0;
20 background: none; 20 background: none;
21} 21}
22
23.colortoolbar .chipContainer {
24 margin: 1px 1px 1px 1px !important;
25 width: 40px !important;
26 height: 20px !important;
27 border: 0;
28 padding: 0;
29 background-image: url(../../../../images/colorpanel/transparent.png) !important;
30 background-repeat: repeat !important;
31} \ No newline at end of file
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 }