From c82807a713b1c69f7781b0c6b8079d9df5e174c2 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Mon, 19 May 2014 23:47:11 +0800 Subject: add issue label attach-detach ui --- public/js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'public/js') 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() { -- cgit v1.2.3