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