mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
19 lines
319 B
JavaScript
19 lines
319 B
JavaScript
|
|
"use strict";
|
||
|
|
|
||
|
|
var admin = {};
|
||
|
|
|
||
|
|
(function() {
|
||
|
|
|
||
|
|
admin.enableColorPicker = function(inputEl, callback) {
|
||
|
|
inputEl.ColorPicker({
|
||
|
|
color: inputEl.val() || '#000',
|
||
|
|
onChange: function(hsb, hex) {
|
||
|
|
inputEl.val('#' + hex);
|
||
|
|
if (typeof callback === 'function') {
|
||
|
|
callback(hsb, hex);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
}());
|