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 | |
parent | 9100786beb0db4b3444d1be24e5a3bd680cdae1e (diff) | |
download | gitea-4a4392192bcf355cc39169a2fcde256d769c324a.tar.gz gitea-4a4392192bcf355cc39169a2fcde256d769c324a.zip |
add milestone issue view ui
Diffstat (limited to 'public')
-rwxr-xr-x | public/css/gogs.css | 43 | ||||
-rw-r--r-- | public/js/app.js | 36 |
2 files changed, 72 insertions, 7 deletions
diff --git a/public/css/gogs.css b/public/css/gogs.css index 12fd8138e9..d3da360f56 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 .assignee.dropdown-menu, #issue .assignee ul, #issue .milestone ul { padding: 0; margin: 0; min-width: 300px; @@ -1451,17 +1451,33 @@ html, body { min-width: 160px; } -#issue .issue-bar .assignee .dropdown-menu{ +#issue .issue-bar .assignee .dropdown-menu, #issue .issue-bar .milestone .dropdown-menu { padding: 0; margin: 0; } -#issue .assignee li { +#issue .assignee li, #issue .milestone li.clear-milestone { padding: 4px 12px; line-height: 30px; } -#issue .assignee li:hover { +#issue .milestone .milestone-item { + padding: 8px 12px; +} + +#issue .milestone li.milestone-item { + border-bottom: 1px solid #CCC; +} + +#issue .milestone li.milestone-item:last-child { + border-bottom: none; +} + +#issue .milestone .milestone-item p { + margin-bottom: 0; +} + +#issue .assignee li:hover, #issue .milestone li.clear-milestone:hover, #issue .milestone li.milestone-item:hover { background-color: #e8f0ff; cursor: pointer; } @@ -1474,7 +1490,7 @@ html, body { #issue .issue-bar > div { padding-bottom: 8px; - margin-bottom: 8px; + margin-bottom: 40px; border-bottom: 1px solid #CCC; } @@ -1482,11 +1498,26 @@ html, body { line-height: 30px; } -#issue .issue-bar .assignee .action{ +#issue .issue-bar .assignee .action, #issue .issue-bar .milestone .action { position: relative; margin-top: -8px; } +#issue .issue-bar .milestone .completion { + margin-top: 20px; + margin-bottom: 12px; +} + +#issue .issue-bar .milestone .completion span { + display: block; + height: 12px; + background-color: #77c64a; +} + +#issue .issue-bar .milestone .nav-tabs a { + padding: 4px 8px; +} + /* wrapper and footer */ #wrapper { 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() { |