You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
426 B
JavaScript

"use strict";
var admin = {};
(function() {
admin.enableColorPicker = function(inputEl, callback) {
(inputEl instanceof jQuery ? inputEl : $(inputEl)).each(function() {
var $this = $(this);
$this.ColorPicker({
color: $this.val() || '#000',
onChange: function(hsb, hex) {
$this.val('#' + hex);
if (typeof callback === 'function') {
callback(hsb, hex);
}
}
});
});
};
}());