mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 16:30:15 +00:00
add milestone issue view ui
This commit is contained in:
parent
9100786beb
commit
4a4392192b
3 changed files with 119 additions and 8 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue