forked from NYANDEV/forgejo
add issue label attach-detach ui
This commit is contained in:
parent
342baf1dda
commit
c82807a713
3 changed files with 86 additions and 3 deletions
|
@ -650,6 +650,18 @@ function initIssue() {
|
|||
$(this).parent().remove();
|
||||
return false;
|
||||
});
|
||||
$('.issue-bar .labels .dropdown-menu').on('click', 'li', function (e) {
|
||||
var url = $('.issue-bar .labels').data("ajax");
|
||||
var id = $(this).data('id');
|
||||
var check = $(this).hasClass("checked");
|
||||
$.post(url, {id: id, action: check ? 'detach' : "attach"}, function (json) {
|
||||
if (json.ok) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
function initRelease() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue