1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 20:30:05 +02:00

no notification if everything is allright

This commit is contained in:
s2
2018-05-18 17:07:13 +02:00
parent 0a2e639e1c
commit 7a6c320ddf
5 changed files with 13 additions and 4 deletions

View File

@@ -27,10 +27,14 @@
if (notification.event && notification.event === 'unlock') {
$('[data-file="' + notification.file + '"].js-unlock').hide();
$('[data-file="' + notification.file + '"].js-lock').show();
let text = 'not locked';
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
}
if (notification.event && notification.event === 'lock') {
$('[data-file="' + notification.file + '"].js-lock').hide();
$('[data-file="' + notification.file + '"].js-unlock').show();
let text = notification.data.owner.name + ' (id: ' + notification.data.id + ')';
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
}
});

View File

@@ -33,7 +33,7 @@ gitlit.templates = {
</table>
<div>
<div class="float-right">
<a class="btn btn-secondary js-refresh" href="javascript:///">
Refresh
</a>