From 73eb284f14c29f0d222df19c5e3266978a2bfc47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 17 Nov 2010 08:55:49 +0100 Subject: [PATCH] Replace existing notifications seamlessly instead of sliding stuff around. --- src/main/resources/static/javascript/sone.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index a7bfe08..bbac57d 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -508,12 +508,11 @@ function getNotifications() { oldNotification = $("#sone #notification-area .notification#" + value.id); notification = ajaxifyNotification(createNotification(value.id, value.text, value.dismissable)).hide(); if (oldNotification.length != 0) { - oldNotification.slideUp(); - notification.insertBefore(oldNotification); + oldNotification.replaceWith(notification.show()); } else { $("#sone #notification-area").append(notification); + notification.slideDown(); } - notification.slideDown(); }); $.each(data.removedNotifications, function(index, value) { $("#sone #notification-area .notification#" + value.id).slideUp(); -- 2.7.4