From 20b0ccefeaf7aed1ff1adeb094136d2309e73c6a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 20 Mar 2022 02:23:11 +0100 Subject: [PATCH] style fix --- .../templates/js/translated/notification.js | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/InvenTree/templates/js/translated/notification.js b/InvenTree/templates/js/translated/notification.js index 0aca0c2d85..c4f644dbe6 100644 --- a/InvenTree/templates/js/translated/notification.js +++ b/InvenTree/templates/js/translated/notification.js @@ -182,28 +182,28 @@ function updateNotificationReadState(btn, panel_caller=false) { var url = `/api/notifications/${btn.attr('pk')}/${btn.attr('target')}/`; inventreePut(url, {}, { - method: 'POST', - success: function() { - // update the notification tables if they were declared - if (window.updateNotifications) { - window.updateNotifications(); - } + method: 'POST', + success: function() { + // update the notification tables if they were declared + if (window.updateNotifications) { + window.updateNotifications(); + } - // update current notification count - var count = parseInt($("#notification-counter").html()); - if (btn.attr('target') == 'read') { - count = count - 1; - } else { - count = count + 1; - } - // update notification indicator now - updateNotificationIndicator(count); + // update current notification count + var count = parseInt($('#notification-counter').html()); + if (btn.attr('target') == 'read') { + count = count - 1; + } else { + count = count + 1; + } + // update notification indicator now + updateNotificationIndicator(count); - // remove notification if called from notification panel - if (panel_caller) { - btn.parent().parent().remove() + // remove notification if called from notification panel + if (panel_caller) { + btn.parent().parent().remove(); + } } - } }); }; @@ -259,16 +259,16 @@ function openNotificationPanel() { if (item.target.link) { link_text = `${link_text}`; } - html += link_text + html += link_text; } html += '
'; html += `${item.age_human}`; html += getReadEditButton(item.pk, item.read, true); - html += "
"; + html += ''; }); // package up - html = `` + html = ``; } // set html @@ -297,9 +297,9 @@ function updateNotificationIndicator(count) { notificationUpdateTic = 0; if (count == 0) { - $("#notification-alert").addClass("d-none"); + $('#notification-alert').addClass('d-none'); } else { - $("#notification-alert").removeClass("d-none"); + $('#notification-alert').removeClass('d-none'); } - $("#notification-counter").html(count); + $('#notification-counter').html(count); }