From 818fcaeb843238ec7bee69862d32ee4511f76604 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 20 Jan 2011 07:00:42 +0100 Subject: [PATCH] When replacing a notification, remember whether it was opened or not. --- src/main/resources/static/javascript/sone.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index a0bbf8a..06e5daf 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -726,6 +726,11 @@ 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"); + notification.find(".short-text").toggleClass("hidden", opened); + notification.find(".text").toggleClass("hidden", !opened); + } oldNotification.replaceWith(notification.show()); } else { $("#sone #notification-area").append(notification); -- 2.7.4