Kanban colored boards (#16647)
Add a column Color in ProjectBoard and color picker in new / edit project board form.
This commit is contained in:
parent
ba1fdbcfdb
commit
ecfac78f6e
14 changed files with 187 additions and 31 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue