|
|
|
@ -127,9 +127,6 @@
|
|
|
|
|
}, 0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (!colorPickers.evt || off) {
|
|
|
|
|
colorPickers.evt = true; // prevent new eventListener for window
|
|
|
|
|
|
|
|
|
|
$(window)[onOff]('mousedown.colorPicker', function(e) {
|
|
|
|
|
var colorPicker = colorPickers.current,
|
|
|
|
|
$colorPicker = $(colorPicker ? colorPicker.nodes.colorPicker : undefined),
|
|
|
|
@ -151,26 +148,21 @@
|
|
|
|
|
$colorPicker.hide(animationSpeed);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
that = this,
|
|
|
|
|
colorPickers = this.colorPickers || [], // this is a way to prevent data binding on HTMLElements
|
|
|
|
|
colorPickers = $.fn.colorPicker.colorPickers || [], // this is a way to prevent data binding on HTMLElements
|
|
|
|
|
testColors = new window.Colors({
|
|
|
|
|
customBG: (config && config.customBG) || '#FFFFFF',
|
|
|
|
|
allMixDetails: true
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.colorPickers = colorPickers;
|
|
|
|
|
$.fn.colorPicker.colorPickers = colorPickers;
|
|
|
|
|
|
|
|
|
|
$(this).each(function(idx, elm) {
|
|
|
|
|
if (config === 'destroy') {
|
|
|
|
|
// doEventListeners(elm, (config && config.multipleInstances), true);
|
|
|
|
|
$(elm).off('.colorPicker');
|
|
|
|
|
$(window).off('.colorPicker');
|
|
|
|
|
if (colorPickers[idx]) {
|
|
|
|
|
colorPickers[idx].destroyAll();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (config !== 'destroy') {
|
|
|
|
|
var value = elm.value.split('(');
|
|
|
|
|
$(elm).data('colorMode', value[1] ? value[0].substr(0, 3) : 'HEX');
|
|
|
|
|
doEventListeners(elm, (config && config.multipleInstances), false);
|
|
|
|
|