From: David ‘Bombe’ Roden Date: Wed, 17 Nov 2010 07:55:49 +0000 (+0100) Subject: Replace existing notifications seamlessly instead of sliding stuff around. X-Git-Tag: 0.3-RC1~35 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;ds=inline;h=73eb284f14c29f0d222df19c5e3266978a2bfc47;p=Sone.git Replace existing notifications seamlessly instead of sliding stuff around. --- 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();