X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=36db543ec605b38933ad557bf5c353ff8695ec3c;hb=6004444a6a2f604b46d1440cd7f0fbe6502245d5;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..36db543 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -776,7 +776,7 @@ 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) { + 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"); } /**