add issue label attach-detach ui

This commit is contained in:
FuXiaoHei 2014-05-19 23:47:11 +08:00
parent 342baf1dda
commit c82807a713
3 changed files with 86 additions and 3 deletions

View file

@ -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() {