diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-19 23:47:11 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-19 23:47:11 +0800 |
commit | c82807a713b1c69f7781b0c6b8079d9df5e174c2 (patch) | |
tree | adec8f0d9826b179a9bd211c4d75a34104a5dc83 /public/js | |
parent | 342baf1ddaa9beb6d856c8f9725093cbbe5d80ac (diff) | |
download | gitea-c82807a713b1c69f7781b0c6b8079d9df5e174c2.tar.gz gitea-c82807a713b1c69f7781b0c6b8079d9df5e174c2.zip |
add issue label attach-detach ui
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/app.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js index 53948578b9..e88dadc2e0 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -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() { |