Fix messages to recipients not working when a new-sone notification is displayed.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 2 May 2011 08:17:12 +0000 (10:17 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 2 May 2011 08:17:12 +0000 (10:17 +0200)
src/main/resources/static/javascript/sone.js
src/main/resources/templates/notify/newSoneNotification.html

index 3088aff..e300214 100644 (file)
@@ -923,8 +923,8 @@ function checkForRemovedSones(oldNotification, newNotification) {
        if (getNotificationId(oldNotification) != "new-sone-notification") {
                return;
        }
-       oldIds = getElementIds(oldNotification, ".sone-id");
-       newIds = getElementIds(newNotification, ".sone-id");
+       oldIds = getElementIds(oldNotification, ".new-sone-id");
+       newIds = getElementIds(newNotification, ".new-sone-id");
        $.each(oldIds, function(index, value) {
                if ($.inArray(value, newIds) == -1) {
                        markSoneAsKnown(getSone(value), true);
@@ -996,7 +996,7 @@ function getStatus() {
                                });
                                if (!foundNotification) {
                                        if (notificationId == "new-sone-notification") {
-                                               $(".sone-id", this).each(function(index, element) {
+                                               $(".new-sone-id", this).each(function(index, element) {
                                                        soneId = $(this).text();
                                                        markSoneAsKnown(getSone(soneId), true);
                                                });
index 03cacf2..64985d8 100644 (file)
@@ -12,7 +12,7 @@
 <div class="text">
        <%= Notification.NewSone.Text|l10n|html>
        <%foreach sones sone>
-               <div class="hidden sone-id"><% sone.id|html></div>
+               <div class="hidden new-sone-id"><% sone.id|html></div>
                <a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a><%notlast>,<%/notlast><%last>.<%/last>
        <%/foreach>
 </div>