mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
make more compact
This commit is contained in:
parent
519b5b7012
commit
6735f83683
@ -236,27 +236,21 @@ var current_alert_state = false;
|
|||||||
function notificationCheck() {
|
function notificationCheck() {
|
||||||
// only refresh state if in focus
|
// only refresh state if in focus
|
||||||
if (document.hasFocus()) {
|
if (document.hasFocus()) {
|
||||||
inventreeGet(
|
inventreeGet(
|
||||||
'/api/notifications/',
|
'/api/notifications/',
|
||||||
{
|
{
|
||||||
read: false,
|
read: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.length == 0) {
|
if (response.length == 0) {
|
||||||
if (current_alert_state == true){
|
|
||||||
$("#notification-alert").addClass("d-none");
|
$("#notification-alert").addClass("d-none");
|
||||||
current_alert_state = false;
|
} else {
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (current_alert_state == false){
|
|
||||||
$("#notification-alert").removeClass("d-none");
|
$("#notification-alert").removeClass("d-none");
|
||||||
current_alert_state = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user