added public/src/admin.js; moved enableColorPicker into admin.enableColorPicker
parent
e2312c8330
commit
29137299c2
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}());
|
Loading…
Reference in New Issue