mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
fix lock/unlock refresh
This commit is contained in:
@@ -43,16 +43,18 @@
|
||||
}
|
||||
|
||||
if (notification.event && notification.event === 'unlock') {
|
||||
$('[data-file="' + notification.file + '"].js-unlock').hide();
|
||||
$('[data-file="' + notification.file + '"].js-lock').show();
|
||||
let file = notification.file.replace(/\\/g, '\\\\');
|
||||
$('[data-file="' + file + '"].js-unlock').hide();
|
||||
$('[data-file="' + file + '"].js-lock').show();
|
||||
let text = 'not locked';
|
||||
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
|
||||
$('[data-file="' + 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 file = notification.file.replace(/\\/g, '\\\\');
|
||||
$('[data-file="' + file + '"].js-lock').hide();
|
||||
$('[data-file="' + file + '"].js-unlock').show();
|
||||
let text = notification.data.owner.name + ' (id: ' + notification.data.id + ')';
|
||||
$('[data-file="' + notification.file + '"]').parent().prev().text(text);
|
||||
$('[data-file="' + file + '"]').parent().prev().text(text);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user