diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-14 21:29:54 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-14 21:29:54 +0800 |
commit | 4a4392192bcf355cc39169a2fcde256d769c324a (patch) | |
tree | 8f44fa7560657c1c3ff9f7ccde144896895f04b5 /public/js | |
parent | 9100786beb0db4b3444d1be24e5a3bd680cdae1e (diff) | |
download | gitea-4a4392192bcf355cc39169a2fcde256d769c324a.tar.gz gitea-4a4392192bcf355cc39169a2fcde256d769c324a.zip |
add milestone issue view ui
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/app.js | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js index 02b6d46476..d7ef225049 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -528,7 +528,7 @@ function initIssue() { var $this = $(this); $this.toggleAjax(function (resp) { $($this.data("preview")).html(resp); - },function(){ + }, function () { $($this.data("preview")).html("no content"); }) }); @@ -569,6 +569,40 @@ function initIssue() { } }); + // milestone + + $('.issue-bar .dropdown-menu a[data-toggle="tab"]').on("click", function (e) { + e.stopPropagation(); + $(this).tab('show'); + return false; + }); + + var $m = $('.milestone'); + if ($m.data("milestone") > 0) { + $('.clear-milestone').toggleShow(); + } + $('.milestone', '#issue').on('click', 'li.milestone-item', function () { + var id = $(this).data("id"); + if (is_issue_bar) { + var m = $m.data("milestone"); + if (id != m) { + $.post($m.data("ajax"), { + issue: $('#issue').data("id"), + milestone: id + }, function (json) { + if (json.ok) { + window.location.reload(); + if (id > 0) { + $('.clear-milestone').toggleShow(); + } else { + $('.clear-milestone').toggleHide(); + } + } + }) + } + } + return; + }); } function initRelease() { |