forked from NYANDEV/forgejo
release-new page ui
This commit is contained in:
parent
98f918ed28
commit
1b0142513e
3 changed files with 141 additions and 0 deletions
|
@ -520,6 +520,23 @@ function initIssue() {
|
|||
|
||||
}
|
||||
|
||||
function initRelease() {
|
||||
// release new ajax preview
|
||||
(function () {
|
||||
$('[data-ajax-name=release-preview]').on("click", function () {
|
||||
var $this = $(this);
|
||||
$this.toggleAjax(function (json) {
|
||||
if (json.ok) {
|
||||
$($this.data("preview")).html(json.content);
|
||||
}
|
||||
})
|
||||
});
|
||||
$('.release-write a[data-toggle]').on("click", function () {
|
||||
$('.release-preview-content').html("loading...");
|
||||
});
|
||||
}())
|
||||
}
|
||||
|
||||
(function ($) {
|
||||
$(function () {
|
||||
initCore();
|
||||
|
@ -539,5 +556,8 @@ function initIssue() {
|
|||
if ($('#issue').length) {
|
||||
initIssue();
|
||||
}
|
||||
if ($('#release').length) {
|
||||
initRelease();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue