mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
added public/src/admin.js; moved enableColorPicker into admin.enableColorPicker
This commit is contained in:
19
public/src/admin.js
Normal file
19
public/src/admin.js
Normal file
@@ -0,0 +1,19 @@
|
||||
"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);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}());
|
||||
Reference in New Issue
Block a user