Use “hidden” CSS class to show the notification’s details.
[Sone.git] / src / main / resources / static / javascript / sone.js
index 405c6be..36db543 100644 (file)
@@ -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");
 }
 
 /**