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; }); } diff --git a/templates/issue/create.tmpl b/templates/issue/create.tmpl index 6d08f69913..4b43116cca 100644 --- a/templates/issue/create.tmpl +++ b/templates/issue/create.tmpl @@ -31,6 +31,48 @@ + No milestone + +