style fix

This commit is contained in:
Matthias 2022-03-20 02:23:11 +01:00
parent c139b90598
commit 20b0ccefea
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -190,7 +190,7 @@ function updateNotificationReadState(btn, panel_caller=false) {
} }
// update current notification count // update current notification count
var count = parseInt($("#notification-counter").html()); var count = parseInt($('#notification-counter').html());
if (btn.attr('target') == 'read') { if (btn.attr('target') == 'read') {
count = count - 1; count = count - 1;
} else { } else {
@ -201,7 +201,7 @@ function updateNotificationReadState(btn, panel_caller=false) {
// remove notification if called from notification panel // remove notification if called from notification panel
if (panel_caller) { if (panel_caller) {
btn.parent().parent().remove() btn.parent().parent().remove();
} }
} }
}); });
@ -259,16 +259,16 @@ function openNotificationPanel() {
if (item.target.link) { if (item.target.link) {
link_text = `<a href='${item.target.link}'>${link_text}</a>`; link_text = `<a href='${item.target.link}'>${link_text}</a>`;
} }
html += link_text html += link_text;
} }
html += '<div>'; html += '<div>';
html += `<span class="text-muted">${item.age_human}</span>`; html += `<span class="text-muted">${item.age_human}</span>`;
html += getReadEditButton(item.pk, item.read, true); html += getReadEditButton(item.pk, item.read, true);
html += "</div></li>"; html += '</div></li>';
}); });
// package up // package up
html = `<ul class="list-group">${html}</ul>` html = `<ul class="list-group">${html}</ul>`;
} }
// set html // set html
@ -297,9 +297,9 @@ function updateNotificationIndicator(count) {
notificationUpdateTic = 0; notificationUpdateTic = 0;
if (count == 0) { if (count == 0) {
$("#notification-alert").addClass("d-none"); $('#notification-alert').addClass('d-none');
} else { } else {
$("#notification-alert").removeClass("d-none"); $('#notification-alert').removeClass('d-none');
} }
$("#notification-counter").html(count); $('#notification-counter').html(count);
} }