diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-14 22:01:20 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-05-14 22:01:20 +0800 |
commit | a1bb3741d5806e11da528078cde90998c8aebb05 (patch) | |
tree | 92f823cb9cfdfe82d3a987bf33593fc9a9fae2fb /public | |
parent | 99f2400e3b4f141671bd8f31d23afcd0cf511c05 (diff) | |
download | gitea-a1bb3741d5806e11da528078cde90998c8aebb05.tar.gz gitea-a1bb3741d5806e11da528078cde90998c8aebb05.zip |
add milestone in new-issue page
Diffstat (limited to 'public')
-rwxr-xr-x | public/css/gogs.css | 10 | ||||
-rw-r--r-- | public/js/app.js | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/public/css/gogs.css b/public/css/gogs.css index d3da360f56..af787ebd0a 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1441,7 +1441,7 @@ html, body { margin-left: .8em; } -#issue .assignee.dropdown-menu, #issue .assignee ul, #issue .milestone ul { +#issue .assignee.dropdown-menu, #issue .assignee ul, #issue .milestone.dropdown-menu, #issue .milestone ul { padding: 0; margin: 0; min-width: 300px; @@ -1514,8 +1514,14 @@ html, body { background-color: #77c64a; } -#issue .issue-bar .milestone .nav-tabs a { +#issue .milestone .nav-tabs a { padding: 4px 8px; + border-top: none; +} + +#milestone { + margin-left: 24px; + margin-right: 12px; } /* wrapper and footer */ diff --git a/public/js/app.js b/public/js/app.js index d7ef225049..d7514f795d 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; }); } |