Kanban colored boards (#16647)

Add a column Color in ProjectBoard and color picker in new / edit project board form.
This commit is contained in:
Romain 2021-09-29 22:53:12 +02:00 committed by GitHub
parent ba1fdbcfdb
commit ecfac78f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 187 additions and 31 deletions

View file

@ -159,13 +159,8 @@ function initLabelEdit() {
$newLabelPanel.hide();
});
createColorPicker($('.color-picker'));
initColorPicker();
$('.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);
});
$('.edit-label-button').on('click', function () {
$('.edit-label .color-picker').minicolors('value', $(this).data('color'));
$('#label-modal-id').val($(this).data('id'));
@ -182,6 +177,16 @@ function initLabelEdit() {
});
}
function initColorPicker() {
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);
});
}
function updateIssuesMeta(url, action, issueIds, elementId) {
return new Promise(((resolve) => {
$.ajax({
@ -2753,6 +2758,10 @@ $(document).ready(async () => {
});
$('.show-modal.button').on('click', function () {
$($(this).data('modal')).modal('show');
const colorPickers = $($(this).data('modal')).find('.color-picker');
if (colorPickers.length > 0) {
initColorPicker();
}
});
$('.delete-post.button').on('click', function () {
const $this = $(this);