Add method to show a notification’s details.
[Sone.git] / src / main / resources / static / javascript / sone.js
index fe2e12d..9aa0b82 100644 (file)
@@ -830,6 +830,17 @@ function createNotification(id, text, dismissable) {
        return notification;
 }
 
+/**
+ * Shows the details of the notification with the given ID.
+ *
+ * @param notificationId
+ *            The ID of the notification
+ */
+function showNotificationDetails(notificationId) {
+       $("#sone .notification#" + notificationId + " .text").show();
+       $("#sone .notification#" + notificationId + " .short-text").hide();
+}
+
 //
 // EVERYTHING BELOW HERE IS EXECUTED AFTER LOADING THE PAGE
 //
@@ -954,9 +965,7 @@ $(document).ready(function() {
        });
 
        /* activate status polling. */
-       if (getPageId() != "login") {
-               setTimeout(getStatus, 5000);
-       }
+       setTimeout(getStatus, 5000);
 
        /* reset activity counter when the page has focus. */
        $(window).focus(function() {