X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=6ff4cebccc16b82157738db2af13e4d09aaae3a6;hb=13e00a0611cd80e43f813171d8b6d84870afbcbc;hp=405c6be90ed93f43c1f384c1a8fc7f18e2af16bf;hpb=912305d5508a628c59a57f977305c3febe1acc70;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 405c6be..6ff4ceb 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -776,8 +776,8 @@ function getStatus() { oldNotification = $("#sone #notification-area .notification#" + value.id); notification = ajaxifyNotification(createNotification(value.id, value.text, value.dismissable)).hide(); if (oldNotification.length != 0) { - if (oldNotification.find(".short-text").length > 0) { - opened = oldNotification.find(".short-text").hasClass("hidden"); + if ((oldNotification.find(".short-text").length > 0) && (notification.find(".short-text").length > 0)) { + opened = oldNotification.is(":visible") && oldNotification.find(".short-text").hasClass("hidden"); notification.find(".short-text").toggleClass("hidden", opened); notification.find(".text").toggleClass("hidden", !opened); } @@ -1081,8 +1081,8 @@ function createNotification(id, text, dismissable) { * The ID of the notification */ function showNotificationDetails(notificationId) { - $("#sone .notification#" + notificationId + " .text").show(); - $("#sone .notification#" + notificationId + " .short-text").hide(); + $("#sone .notification#" + notificationId + " .text").removeClass("hidden"); + $("#sone .notification#" + notificationId + " .short-text").addClass("hidden"); } /**