X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=36db543ec605b38933ad557bf5c353ff8695ec3c;hb=6004444a6a2f604b46d1440cd7f0fbe6502245d5;hp=a673f8c6467a46f6fb4be357b5f4bcdb1dffc97b;hpb=f46e15707f668419a1dea76b5fc690086f9cebcd;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index a673f8c..36db543 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.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"); } /**