|
|
@ -1188,16 +1188,24 @@ define([
|
|
|
|
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'});
|
|
|
|
var $spinner = $('<span>', {'class': 'fa fa-spinner fa-pulse'});
|
|
|
|
|
|
|
|
|
|
|
|
// when jscolor picker value change
|
|
|
|
// when jscolor picker value change
|
|
|
|
var onchange = function (colorL) {
|
|
|
|
var _onchange = function (colorL) {
|
|
|
|
var val = "#" + colorL.toString();
|
|
|
|
var val = "#" + colorL.toString();
|
|
|
|
if (!/^#[0-9a-fA-F]{6}$/.test(val)) { return; }
|
|
|
|
if (!/^#[0-9a-fA-F]{6}$/.test(val)) { return; }
|
|
|
|
$spinner.show();
|
|
|
|
|
|
|
|
$ok.hide();
|
|
|
|
|
|
|
|
common.setAttribute(['general', 'cursor', 'color'], val, function () {
|
|
|
|
common.setAttribute(['general', 'cursor', 'color'], val, function () {
|
|
|
|
$spinner.hide();
|
|
|
|
$spinner.hide();
|
|
|
|
$ok.show();
|
|
|
|
$ok.show();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
var to;
|
|
|
|
|
|
|
|
var onchange = function (colorL) {
|
|
|
|
|
|
|
|
$spinner.show();
|
|
|
|
|
|
|
|
$ok.hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (to) { clearTimeout(to); }
|
|
|
|
|
|
|
|
to = setTimeout(function () {
|
|
|
|
|
|
|
|
_onchange(colorL);
|
|
|
|
|
|
|
|
}, 300);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// jscolor picker
|
|
|
|
// jscolor picker
|
|
|
|
var jscolorL = new window.jscolor($colorPicker[0],{showOnClick: false, onFineChange: onchange, valueElement:undefined});
|
|
|
|
var jscolorL = new window.jscolor($colorPicker[0],{showOnClick: false, onFineChange: onchange, valueElement:undefined});
|
|
|
|