preventFocus update

pull/25/head
peterd 9 years ago
parent 7123fb0fec
commit 3873bbb1e7

@ -287,14 +287,15 @@
mode = value.split('('), mode = value.split('('),
$elm = findElement($(this)); $elm = findElement($(this));
// save initial color mode and set color and bgColor // save initial color mode and set color and bgColor
$elm.data('colorMode', mode[1] ? mode[0].substr(0, 3) : 'HEX'); $elm.data('colorMode', mode[1] ? mode[0].substr(0, 3) : 'HEX').
attr('readonly', _options.preventFocus);
options.doRender && $elm. options.doRender && $elm.
css({'background-color': value, css({'background-color': value,
'color': function() { 'color': function() {
return _color.setColor(value). return _color.setColor(value).
rgbaMixBGMixCustom.luminance > 0.22 ? '#222' : '#ddd' rgbaMixBGMixCustom.luminance > 0.22 ? '#222' : '#ddd'
} }
}).attr('readonly', _options.preventFocus); });
}); });
}; };
})(window.jQuery, Colors); })(window.jQuery, Colors);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save