mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-20 11:33:25 +02:00
* split `index.js` to separate files * tune clipboard * fix promise * fix document * remove intermediate empty file * fix async event listener * use `export function` instead of `export {}`, add more comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
12 lines
351 B
JavaScript
12 lines
351 B
JavaScript
import createColorPicker from '../colorpicker.js';
|
|
|
|
export function initCompColorPicker() {
|
|
createColorPicker($('.color-picker'));
|
|
|
|
$('.precolors .color').on('click', function () {
|
|
const color_hex = $(this).data('color-hex');
|
|
$('.color-picker').val(color_hex);
|
|
$('.minicolors-swatch-color').css('background-color', color_hex);
|
|
});
|
|
}
|