Merge branch 'master' of https://github.com/designcreateplay/NodeBB
commit
822cf56af1
@ -0,0 +1,23 @@
|
||||
"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);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
}());
|
Loading…
Reference in New Issue