~jstys-z/helioviewer.org/timeline

« back to all changes in this revision

Viewing changes to lib/jquery/jquery.ui-1.6rc2/ui/ui.colorpicker.js

  • Committer: V. Keith Hughitt
  • Date: 2009-03-26 19:20:57 UTC
  • Revision ID: hughitt1@kore-20090326192057-u0x8rf8sf5lmmnwh
nightly build 03-26-2009: Using alpha-channel JPEG 2000 dataset

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * jQuery UI Color Picker @VERSION
3
 
 *
4
 
 * Copyright (c) 2008 Stefan Petre, Paul Bakaus
5
 
 * Dual licensed under the MIT (MIT-LICENSE.txt)
6
 
 * and GPL (GPL-LICENSE.txt) licenses.
7
 
 *
8
 
 * http://docs.jquery.com/UI/ColorPicker
9
 
 *
10
 
 * Depends:
11
 
 *      ui.core.js
12
 
 */
13
 
(function ($) {
14
 
 
15
 
$.widget("ui.colorpicker", {
16
 
 
17
 
        _init: function() {
18
 
 
19
 
                this.charMin = 65;
20
 
                var o = this.options, self = this,
21
 
                tpl = '<div class="ui-colorpicker clearfix"><div class="ui-colorpicker-color"><div><div></div></div></div><div class="ui-colorpicker-hue"><div></div></div><div class="ui-colorpicker-new-color"></div><div class="ui-colorpicker-current-color"></div><div class="ui-colorpicker-hex"><label for="ui-colorpicker-hex" title="hex"></label><input type="text" maxlength="6" size="6" /></div><div class="ui-colorpicker-rgb-r ui-colorpicker-field"><label for="ui-colorpicker-rgb-r"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-rgb-g ui-colorpicker-field"><label for="ui-colorpicker-rgb-g"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-rgb-b ui-colorpicker-field"><label for="ui-colorpicker-rgb-b"</label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-h ui-colorpicker-field"><label for="ui-colorpicker-hsb-h"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-s ui-colorpicker-field"><label for="ui-colorpicker-hsb-s"></label><input type="text" maxlength="3" size="2" /><span></span></div><div class="ui-colorpicker-hsb-b ui-colorpicker-field"><label for="ui-colorpicker-hsb-b"></label><input type="text" maxlength="3" size="2" /><span></span></div><button class="ui-colorpicker-submit ui-default-state" name="submit" type="button">Done</button></div>';
22
 
 
23
 
                if (typeof o.color == 'string') {
24
 
                        this.color = this._HexToHSB(o.color);
25
 
                } else if (o.color.r != undefined && o.color.g != undefined && o.color.b != undefined) {
26
 
                        this.color = this._RGBToHSB(o.color);
27
 
                } else if (o.color.h != undefined && o.color.s != undefined && o.color.b != undefined) {
28
 
                        this.color = this._fixHSB(o.color);
29
 
                } else {
30
 
                        return this;
31
 
                }
32
 
 
33
 
                this.origColor = this.color;
34
 
                this.picker = $(tpl);
35
 
 
36
 
                if (o.flat) {
37
 
                        this.picker.appendTo(this.element).show();
38
 
                } else {
39
 
                        this.picker.appendTo(document.body);
40
 
                }
41
 
 
42
 
                this.fields = this.picker.find('input')
43
 
                                                .bind('keydown', function(e) { return self._keyDown.call(self, e); })
44
 
                                                .bind('change', function(e) { return self._change.call(self, e); })
45
 
                                                .bind('blur', function(e) { return self._blur.call(self, e); })
46
 
                                                .bind('focus', function(e) { return self._focus.call(self, e); });
47
 
 
48
 
                this.picker.find('span').bind('mousedown', function(e) { return self._downIncrement.call(self, e); });
49
 
 
50
 
                this.selector = this.picker.find('div.ui-colorpicker-color').bind('mousedown', function(e) { return self._downSelector.call(self, e); });
51
 
                this.selectorIndic = this.selector.find('div div');
52
 
                this.hue = this.picker.find('div.ui-colorpicker-hue div');
53
 
                this.picker.find('div.ui-colorpicker-hue').bind('mousedown', function(e) { return self._downHue.call(self, e); });
54
 
 
55
 
                this.newColor = this.picker.find('div.ui-colorpicker-new-color');
56
 
                this.currentColor = this.picker.find('div.ui-colorpicker-current-color');
57
 
 
58
 
                this.picker.find('.ui-colorpicker-submit')
59
 
                        .bind('mouseenter', function(e) { return self._enterSubmit.call(self, e); })
60
 
                        .bind('mouseleave', function(e) { return self._leaveSubmit.call(self, e); })
61
 
                        .bind('click', function(e) { return self._clickSubmit.call(self, e); });
62
 
 
63
 
                this._fillRGBFields(this.color);
64
 
                this._fillHSBFields(this.color);
65
 
                this._fillHexFields(this.color);
66
 
                this._setHue(this.color);
67
 
                this._setSelector(this.color);
68
 
                this._setCurrentColor(this.color);
69
 
                this._setNewColor(this.color);
70
 
 
71
 
                if (o.flat) {
72
 
                        this.picker.css({
73
 
                                position: 'relative',
74
 
                                display: 'block'
75
 
                        });
76
 
                } else {
77
 
                        $(this.element).bind(o.eventName+".colorpicker", function(e) { return self._show.call(self, e); });
78
 
                }
79
 
 
80
 
        },
81
 
 
82
 
        destroy: function() {
83
 
 
84
 
                this.picker.remove();
85
 
                this.element.removeData("colorpicker").unbind(".colorpicker");
86
 
 
87
 
        },
88
 
 
89
 
        _fillRGBFields: function(hsb) {
90
 
                var rgb = this._HSBToRGB(hsb);
91
 
                this.fields
92
 
                        .eq(1).val(rgb.r).end()
93
 
                        .eq(2).val(rgb.g).end()
94
 
                        .eq(3).val(rgb.b).end();
95
 
        },
96
 
        _fillHSBFields: function(hsb) {
97
 
                this.fields
98
 
                        .eq(4).val(hsb.h).end()
99
 
                        .eq(5).val(hsb.s).end()
100
 
                        .eq(6).val(hsb.b).end();
101
 
        },
102
 
        _fillHexFields: function (hsb) {
103
 
                this.fields
104
 
                        .eq(0).val(this._HSBToHex(hsb)).end();
105
 
        },
106
 
        _setSelector: function(hsb) {
107
 
                this.selector.css('backgroundColor', '#' + this._HSBToHex({h: hsb.h, s: 100, b: 100}));
108
 
                this.selectorIndic.css({
109
 
                        left: parseInt(150 * hsb.s/100, 10),
110
 
                        top: parseInt(150 * (100-hsb.b)/100, 10)
111
 
                });
112
 
        },
113
 
        _setHue: function(hsb) {
114
 
                this.hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
115
 
        },
116
 
        _setCurrentColor: function(hsb) {
117
 
                this.currentColor.css('backgroundColor', '#' + this._HSBToHex(hsb));
118
 
        },
119
 
        _setNewColor: function(hsb) {
120
 
                this.newColor.css('backgroundColor', '#' + this._HSBToHex(hsb));
121
 
        },
122
 
        _keyDown: function(e) {
123
 
                var pressedKey = e.charCode || e.keyCode || -1;
124
 
                if ((pressedKey >= this.charMin && pressedKey <= 90) || pressedKey == 32) {
125
 
                        return false;
126
 
                }
127
 
        },
128
 
        _change: function(e, target) {
129
 
 
130
 
                var col;
131
 
                target = target || e.target;
132
 
                if (target.parentNode.className.indexOf('-hex') > 0) {
133
 
                        this.color = col = this._HexToHSB(this.value);
134
 
                        this._fillRGBFields(col.color);
135
 
                        this._fillHSBFields(col);
136
 
                } else if (target.parentNode.className.indexOf('-hsb') > 0) {
137
 
                        this.color = col = this._fixHSB({
138
 
                                h: parseInt(this.fields.eq(4).val(), 10),
139
 
                                s: parseInt(this.fields.eq(5).val(), 10),
140
 
                                b: parseInt(this.fields.eq(6).val(), 10)
141
 
                        });
142
 
                        this._fillRGBFields(col);
143
 
                        this._fillHexFields(col);
144
 
                } else {
145
 
                        this.color = col = this._RGBToHSB(this._fixRGB({
146
 
                                r: parseInt(this.fields.eq(1).val(), 10),
147
 
                                g: parseInt(this.fields.eq(2).val(), 10),
148
 
                                b: parseInt(this.fields.eq(3).val(), 10)
149
 
                        }));
150
 
                        this._fillHexFields(col);
151
 
                        this._fillHSBFields(col);
152
 
                }
153
 
                this._setSelector(col);
154
 
                this._setHue(col);
155
 
                this._setNewColor(col);
156
 
 
157
 
                this._trigger('change', e, { options: this.options, hsb: col, hex: this._HSBToHex(col), rgb: this._HSBToRGB(col) });
158
 
        },
159
 
        _blur: function(e) {
160
 
 
161
 
                var col = this.color;
162
 
                this._fillRGBFields(col);
163
 
                this._fillHSBFields(col);
164
 
                this._fillHexFields(col);
165
 
                this._setHue(col);
166
 
                this._setSelector(col);
167
 
                this._setNewColor(col);
168
 
                this.fields.parent().removeClass('ui-colorpicker-focus');
169
 
 
170
 
        },
171
 
        _focus: function(e) {
172
 
 
173
 
                this.charMin = e.target.parentNode.className.indexOf('-hex') > 0 ? 70 : 65;
174
 
                this.fields.parent().removeClass('ui-colorpicker-focus');
175
 
                $(e.target.parentNode).addClass('ui-colorpicker-focus');
176
 
 
177
 
        },
178
 
        _downIncrement: function(e) {
179
 
 
180
 
                var field = $(e.target).parent().find('input').focus(), self = this;
181
 
                this.currentIncrement = {
182
 
                        el: $(e.target).parent().addClass('ui-colorpicker-slider'),
183
 
                        max: e.target.parentNode.className.indexOf('-hsb-h') > 0 ? 360 : (e.target.parentNode.className.indexOf('-hsb') > 0 ? 100 : 255),
184
 
                        y: e.pageY,
185
 
                        field: field,
186
 
                        val: parseInt(field.val(), 10)
187
 
                };
188
 
                $(document).bind('mouseup.cpSlider', function(e) { return self._upIncrement.call(self, e); });
189
 
                $(document).bind('mousemove.cpSlider', function(e) { return self._moveIncrement.call(self, e); });
190
 
                return false;
191
 
 
192
 
        },
193
 
        _moveIncrement: function(e) {
194
 
                this.currentIncrement.field.val(Math.max(0, Math.min(this.currentIncrement.max, parseInt(this.currentIncrement.val + e.pageY - this.currentIncrement.y, 10))));
195
 
                this._change.apply(this, [e, this.currentIncrement.field.get(0)]);
196
 
                return false;
197
 
        },
198
 
        _upIncrement: function(e) {
199
 
                this.currentIncrement.el.removeClass('ui-colorpicker-slider').find('input').focus();
200
 
                this._change.apply(this, [e, this.currentIncrement.field.get(0)]);
201
 
                $(document).unbind('mouseup.cpSlider');
202
 
                $(document).unbind('mousemove.cpSlider');
203
 
                return false;
204
 
        },
205
 
        _downHue: function(e) {
206
 
 
207
 
                this.currentHue = {
208
 
                        y: this.picker.find('div.ui-colorpicker-hue').offset().top
209
 
                };
210
 
 
211
 
                this._change.apply(this, [e, this
212
 
                                .fields
213
 
                                .eq(4)
214
 
                                .val(parseInt(360*(150 - Math.max(0,Math.min(150,(e.pageY - this.currentHue.y))))/150, 10))
215
 
                                .get(0)]);
216
 
 
217
 
                var self = this;
218
 
                $(document).bind('mouseup.cpSlider', function(e) { return self._upHue.call(self, e); });
219
 
                $(document).bind('mousemove.cpSlider', function(e) { return self._moveHue.call(self, e); });
220
 
                return false;
221
 
 
222
 
        },
223
 
        _moveHue: function(e) {
224
 
 
225
 
                this._change.apply(this, [e, this
226
 
                                .fields
227
 
                                .eq(4)
228
 
                                .val(parseInt(360*(150 - Math.max(0,Math.min(150,(e.pageY - this.currentHue.y))))/150, 10))
229
 
                                .get(0)]);
230
 
 
231
 
                return false;
232
 
 
233
 
        },
234
 
        _upHue: function(e) {
235
 
                $(document).unbind('mouseup.cpSlider');
236
 
                $(document).unbind('mousemove.cpSlider');
237
 
                return false;
238
 
        },
239
 
        _downSelector: function(e) {
240
 
 
241
 
                var self = this;
242
 
                this.currentSelector = {
243
 
                        pos: this.picker.find('div.ui-colorpicker-color').offset()
244
 
                };
245
 
 
246
 
                this._change.apply(this, [e, this
247
 
                                .fields
248
 
                                .eq(6)
249
 
                                .val(parseInt(100*(150 - Math.max(0,Math.min(150,(e.pageY - this.currentSelector.pos.top))))/150, 10))
250
 
                                .end()
251
 
                                .eq(5)
252
 
                                .val(parseInt(100*(Math.max(0,Math.min(150,(e.pageX - this.currentSelector.pos.left))))/150, 10))
253
 
                                .get(0)
254
 
                ]);
255
 
                $(document).bind('mouseup.cpSlider', function(e) { return self._upSelector.call(self, e); });
256
 
                $(document).bind('mousemove.cpSlider', function(e) { return self._moveSelector.call(self, e); });
257
 
                return false;
258
 
 
259
 
        },
260
 
        _moveSelector: function(e) {
261
 
 
262
 
                this._change.apply(this, [e, this
263
 
                                .fields
264
 
                                .eq(6)
265
 
                                .val(parseInt(100*(150 - Math.max(0,Math.min(150,(e.pageY - this.currentSelector.pos.top))))/150, 10))
266
 
                                .end()
267
 
                                .eq(5)
268
 
                                .val(parseInt(100*(Math.max(0,Math.min(150,(e.pageX - this.currentSelector.pos.left))))/150, 10))
269
 
                                .get(0)
270
 
                ]);
271
 
                return false;
272
 
 
273
 
        },
274
 
        _upSelector: function(e) {
275
 
                $(document).unbind('mouseup.cpSlider');
276
 
                $(document).unbind('mousemove.cpSlider');
277
 
                return false;
278
 
        },
279
 
        _enterSubmit: function(e) {
280
 
                this.picker.find('.ui-colorpicker-submit').addClass('ui-colorpicker-focus');
281
 
        },
282
 
        _leaveSubmit: function(e) {
283
 
                this.picker.find('.ui-colorpicker-submit').removeClass('ui-colorpicker-focus');
284
 
        },
285
 
        _clickSubmit: function(e) {
286
 
 
287
 
                var col = this.color;
288
 
                this.origColor = col;
289
 
                this._setCurrentColor(col);
290
 
 
291
 
                this._trigger("submit", e, { options: this.options, hsb: col, hex: this._HSBToHex(col), rgb: this._HSBToRGB(col) });
292
 
                return false;
293
 
 
294
 
        },
295
 
        _show: function(e) {
296
 
 
297
 
                this._trigger("beforeShow", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) });
298
 
 
299
 
                var pos = this.element.offset();
300
 
                var viewPort = this._getScroll();
301
 
                var top = pos.top + this.element[0].offsetHeight;
302
 
                var left = pos.left;
303
 
                if (top + 176 > viewPort.t + Math.min(viewPort.h,viewPort.ih)) {
304
 
                        top -= this.element[0].offsetHeight + 176;
305
 
                }
306
 
                if (left + 356 > viewPort.l + Math.min(viewPort.w,viewPort.iw)) {
307
 
                        left -= 356;
308
 
                }
309
 
                this.picker.css({left: left + 'px', top: top + 'px'});
310
 
                if (this._trigger("show", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) }) != false) {
311
 
                        this.picker.show();
312
 
                }
313
 
 
314
 
                var self = this;
315
 
                $(document).bind('mousedown.colorpicker', function(e) { return self._hide.call(self, e); });
316
 
                return false;
317
 
 
318
 
        },
319
 
        _hide: function(e) {
320
 
 
321
 
                if (!this._isChildOf(this.picker[0], e.target, this.picker[0])) {
322
 
                        if (this._trigger("hide", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) }) != false) {
323
 
                                this.picker.hide();
324
 
                        }
325
 
                        $(document).unbind('mousedown.colorpicker');
326
 
                }
327
 
 
328
 
        },
329
 
        _isChildOf: function(parentEl, el, container) {
330
 
                if (parentEl == el) {
331
 
                        return true;
332
 
                }
333
 
                if (parentEl.contains && !$.browser.safari) {
334
 
                        return parentEl.contains(el);
335
 
                }
336
 
                if ( parentEl.compareDocumentPosition ) {
337
 
                        return !!(parentEl.compareDocumentPosition(el) & 16);
338
 
                }
339
 
                var prEl = el.parentNode;
340
 
                while(prEl && prEl != container) {
341
 
                        if (prEl == parentEl)
342
 
                                return true;
343
 
                        prEl = prEl.parentNode;
344
 
                }
345
 
                return false;
346
 
        },
347
 
        _getScroll: function() {
348
 
                var t,l,w,h,iw,ih;
349
 
                if (document.documentElement) {
350
 
                        t = document.documentElement.scrollTop;
351
 
                        l = document.documentElement.scrollLeft;
352
 
                        w = document.documentElement.scrollWidth;
353
 
                        h = document.documentElement.scrollHeight;
354
 
                } else {
355
 
                        t = document.body.scrollTop;
356
 
                        l = document.body.scrollLeft;
357
 
                        w = document.body.scrollWidth;
358
 
                        h = document.body.scrollHeight;
359
 
                }
360
 
                iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
361
 
                ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;
362
 
                return { t: t, l: l, w: w, h: h, iw: iw, ih: ih };
363
 
        },
364
 
        _fixHSB: function(hsb) {
365
 
                return {
366
 
                        h: Math.min(360, Math.max(0, hsb.h)),
367
 
                        s: Math.min(100, Math.max(0, hsb.s)),
368
 
                        b: Math.min(100, Math.max(0, hsb.b))
369
 
                };
370
 
        },
371
 
        _fixRGB: function(rgb) {
372
 
                return {
373
 
                        r: Math.min(255, Math.max(0, rgb.r)),
374
 
                        g: Math.min(255, Math.max(0, rgb.g)),
375
 
                        b: Math.min(255, Math.max(0, rgb.b))
376
 
                };
377
 
        },
378
 
        _HexToRGB: function (hex) {
379
 
                var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
380
 
                return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
381
 
        },
382
 
        _HexToHSB: function(hex) {
383
 
                return this._RGBToHSB(this._HexToRGB(hex));
384
 
        },
385
 
        _RGBToHSB: function(rgb) {
386
 
                var hsb = {};
387
 
                hsb.b = Math.max(Math.max(rgb.r,rgb.g),rgb.b);
388
 
                hsb.s = (hsb.b <= 0) ? 0 : Math.round(100*(hsb.b - Math.min(Math.min(rgb.r,rgb.g),rgb.b))/hsb.b);
389
 
                hsb.b = Math.round((hsb.b /255)*100);
390
 
                if((rgb.r==rgb.g) && (rgb.g==rgb.b)) hsb.h = 0;
391
 
                else if(rgb.r>=rgb.g && rgb.g>=rgb.b) hsb.h = 60*(rgb.g-rgb.b)/(rgb.r-rgb.b);
392
 
                else if(rgb.g>=rgb.r && rgb.r>=rgb.b) hsb.h = 60  + 60*(rgb.g-rgb.r)/(rgb.g-rgb.b);
393
 
                else if(rgb.g>=rgb.b && rgb.b>=rgb.r) hsb.h = 120 + 60*(rgb.b-rgb.r)/(rgb.g-rgb.r);
394
 
                else if(rgb.b>=rgb.g && rgb.g>=rgb.r) hsb.h = 180 + 60*(rgb.b-rgb.g)/(rgb.b-rgb.r);
395
 
                else if(rgb.b>=rgb.r && rgb.r>=rgb.g) hsb.h = 240 + 60*(rgb.r-rgb.g)/(rgb.b-rgb.g);
396
 
                else if(rgb.r>=rgb.b && rgb.b>=rgb.g) hsb.h = 300 + 60*(rgb.r-rgb.b)/(rgb.r-rgb.g);
397
 
                else hsb.h = 0;
398
 
                hsb.h = Math.round(hsb.h);
399
 
                return hsb;
400
 
        },
401
 
        _HSBToRGB: function(hsb) {
402
 
                var rgb = {};
403
 
                var h = Math.round(hsb.h);
404
 
                var s = Math.round(hsb.s*255/100);
405
 
                var v = Math.round(hsb.b*255/100);
406
 
                if(s == 0) {
407
 
                        rgb.r = rgb.g = rgb.b = v;
408
 
                } else {
409
 
                        var t1 = v;
410
 
                        var t2 = (255-s)*v/255;
411
 
                        var t3 = (t1-t2)*(h%60)/60;
412
 
                        if(h==360) h = 0;
413
 
                        if(h<60) {rgb.r=t1;     rgb.b=t2; rgb.g=t2+t3;}
414
 
                        else if(h<120) {rgb.g=t1; rgb.b=t2;     rgb.r=t1-t3;}
415
 
                        else if(h<180) {rgb.g=t1; rgb.r=t2;     rgb.b=t2+t3;}
416
 
                        else if(h<240) {rgb.b=t1; rgb.r=t2;     rgb.g=t1-t3;}
417
 
                        else if(h<300) {rgb.b=t1; rgb.g=t2;     rgb.r=t2+t3;}
418
 
                        else if(h<360) {rgb.r=t1; rgb.g=t2;     rgb.b=t1-t3;}
419
 
                        else {rgb.r=0; rgb.g=0; rgb.b=0;}
420
 
                }
421
 
                return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
422
 
        },
423
 
        _RGBToHex: function(rgb) {
424
 
                var hex = [
425
 
                        rgb.r.toString(16),
426
 
                        rgb.g.toString(16),
427
 
                        rgb.b.toString(16)
428
 
                ];
429
 
                $.each(hex, function (nr, val) {
430
 
                        if (val.length == 1) {
431
 
                                hex[nr] = '0' + val;
432
 
                        }
433
 
                });
434
 
                return hex.join('');
435
 
        },
436
 
        _HSBToHex: function(hsb) {
437
 
                return this._RGBToHex(this._HSBToRGB(hsb));
438
 
        },
439
 
        setColor: function(col) {
440
 
                if (typeof col == 'string') {
441
 
                        col = this._HexToHSB(col);
442
 
                } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
443
 
                        col = this._RGBToHSB(col);
444
 
                } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
445
 
                        col = this._fixHSB(col);
446
 
                } else {
447
 
                        return this;
448
 
                }
449
 
 
450
 
                this.color = col;
451
 
                this.origColor = col;
452
 
                this._fillRGBFields(col);
453
 
                this._fillHSBFields(col);
454
 
                this._fillHexFields(col);
455
 
                this._setHue(col);
456
 
                this._setSelector(col);
457
 
                this._setCurrentColor(col);
458
 
                this._setNewColor(col);
459
 
 
460
 
        }
461
 
 
462
 
});
463
 
 
464
 
$.extend($.ui.colorpicker, {
465
 
        defaults: {
466
 
                eventName: 'click',
467
 
                color: 'ff0000',
468
 
                flat: false
469
 
        }
470
 
});
471
 
 
472
 
})(jQuery);
 
 
b'\\ No newline at end of file'