mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
File diff suppressed because one or more lines are too long
@@ -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 = ['${', '}'];
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
margin-bottom: 15px !important;
|
||||
background-color: #FAFAFA !important;
|
||||
border-width: 1px !important;
|
||||
|
||||
|
||||
.octicon {
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
@@ -33,7 +33,7 @@
|
||||
.name {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
.metas {
|
||||
color: #888;
|
||||
font-size: 14px;
|
||||
@@ -50,6 +50,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.ui.repository.branches {
|
||||
.time{
|
||||
font-size: 12px;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
|
||||
.ui.user.list {
|
||||
.item {
|
||||
padding-bottom: 25px;
|
||||
|
@@ -1313,6 +1313,27 @@
|
||||
border-bottom: 1px solid #A3C293;
|
||||
}
|
||||
}
|
||||
.ui.segment.sub-menu {
|
||||
padding: 7px;
|
||||
line-height: 0;
|
||||
.list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
.item {
|
||||
width:100%;
|
||||
border-radius: 3px;
|
||||
a {
|
||||
color: black;
|
||||
&:hover {
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
background: rgba(0,0,0,.05);;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// End of .repository
|
||||
|
||||
|
Reference in New Issue
Block a user