mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-22 01:34:18 +00:00
Add branch overiew page (#2108)
* Add branch overiew page * fix changed method name on sub menu * remove unused code
This commit is contained in:
parent
e86a0bf3fe
commit
3ab580c8d6
21 changed files with 701 additions and 52 deletions
|
@ -1423,29 +1423,18 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
// Helpers.
|
||||
$('.delete-button').click(function () {
|
||||
var $this = $(this);
|
||||
var filter = "";
|
||||
if ($this.attr("id")) {
|
||||
filter += "#"+$this.attr("id")
|
||||
}
|
||||
$('.delete.modal'+filter).modal({
|
||||
closable: false,
|
||||
onApprove: function () {
|
||||
if ($this.data('type') == "form") {
|
||||
$($this.data('form')).submit();
|
||||
return;
|
||||
}
|
||||
$('.delete-button').click(showDeletePopup);
|
||||
|
||||
$.post($this.data('url'), {
|
||||
"_csrf": csrf,
|
||||
"id": $this.data("id")
|
||||
}).done(function (data) {
|
||||
window.location.href = data.redirect;
|
||||
});
|
||||
}
|
||||
}).modal('show');
|
||||
return false;
|
||||
$('.delete-branch-button').click(showDeletePopup);
|
||||
|
||||
$('.undo-button').click(function() {
|
||||
var $this = $(this);
|
||||
$.post($this.data('url'), {
|
||||
"_csrf": csrf,
|
||||
"id": $this.data("id")
|
||||
}).done(function(data) {
|
||||
window.location.href = data.redirect;
|
||||
});
|
||||
});
|
||||
$('.show-panel.button').click(function () {
|
||||
$($(this).data('panel')).show();
|
||||
|
@ -1608,6 +1597,32 @@ $(function () {
|
|||
});
|
||||
});
|
||||
|
||||
function showDeletePopup() {
|
||||
var $this = $(this);
|
||||
var filter = "";
|
||||
if ($this.attr("id")) {
|
||||
filter += "#" + $this.attr("id")
|
||||
}
|
||||
|
||||
$('.delete.modal' + filter).modal({
|
||||
closable: false,
|
||||
onApprove: function() {
|
||||
if ($this.data('type') == "form") {
|
||||
$($this.data('form')).submit();
|
||||
return;
|
||||
}
|
||||
|
||||
$.post($this.data('url'), {
|
||||
"_csrf": csrf,
|
||||
"id": $this.data("id")
|
||||
}).done(function(data) {
|
||||
window.location.href = data.redirect;
|
||||
});
|
||||
}
|
||||
}).modal('show');
|
||||
return false;
|
||||
}
|
||||
|
||||
function initVueComponents(){
|
||||
var vueDelimeters = ['${', '}'];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue