From a1bb3741d5806e11da528078cde90998c8aebb05 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Wed, 14 May 2014 22:01:20 +0800 Subject: add milestone in new-issue page --- public/js/app.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'public/js') diff --git a/public/js/app.js b/public/js/app.js index d7ef2250..d7514f79 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -571,7 +571,7 @@ function initIssue() { // milestone - $('.issue-bar .dropdown-menu a[data-toggle="tab"]').on("click", function (e) { + $('#issue .dropdown-menu a[data-toggle="tab"]').on("click", function (e) { e.stopPropagation(); $(this).tab('show'); return false; @@ -580,6 +580,7 @@ function initIssue() { var $m = $('.milestone'); if ($m.data("milestone") > 0) { $('.clear-milestone').toggleShow(); + console.log("show"); } $('.milestone', '#issue').on('click', 'li.milestone-item', function () { var id = $(this).data("id"); @@ -600,8 +601,16 @@ function initIssue() { } }) } + return; + } + $('#milestone-id').val(id); + if (id > 0) { + $('.clear-milestone').toggleShow(); + $('#milestone').text($(this).find("strong").text()) + } else { + $('.clear-milestone').toggleHide(); + $('#milestone').text($('#milestone').data("no-milestone")); } - return; }); } -- cgit v1.2.3