KanBan: be able to set default board (#14147)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
c09e11d018
commit
3091600cc8
7 changed files with 193 additions and 56 deletions
|
@ -27,14 +27,14 @@ export default async function initProject() {
|
|||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
$('.edit-project-board').each(function () {
|
||||
const projectTitleLabel = $(this).closest('.board-column-header').find('.board-label');
|
||||
const projectTitleInput = $(this).find(
|
||||
'.content > .form > .field > .project-board-title'
|
||||
'.content > .form > .field > .project-board-title',
|
||||
);
|
||||
|
||||
$(this)
|
||||
|
@ -59,6 +59,21 @@ export default async function initProject() {
|
|||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.set-default-project-board', async function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
await $.ajax({
|
||||
method: 'POST',
|
||||
url: $(this).data('url'),
|
||||
headers: {
|
||||
'X-Csrf-Token': csrf,
|
||||
'X-Remote': true,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
});
|
||||
|
||||
window.location.reload();
|
||||
});
|
||||
$('.delete-project-board').each(function () {
|
||||
$(this).click(function (e) {
|
||||
e.preventDefault();
|
||||
|
@ -72,7 +87,7 @@ export default async function initProject() {
|
|||
contentType: 'application/json',
|
||||
method: 'DELETE',
|
||||
}).done(() => {
|
||||
setTimeout(window.location.reload(true), 2000);
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -93,7 +108,7 @@ export default async function initProject() {
|
|||
method: 'POST',
|
||||
}).done(() => {
|
||||
boardTitle.closest('form').removeClass('dirty');
|
||||
setTimeout(window.location.reload(true), 2000);
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue