Add method to return the last-updated time of a notification element.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Apr 2011 18:00:31 +0000 (20:00 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 14 Apr 2011 18:00:31 +0000 (20:00 +0200)
src/main/resources/static/javascript/sone.js

index d58f17f..5232431 100644 (file)
@@ -416,6 +416,17 @@ function getNotificationId(notificationElement) {
        return $(notificationElement).attr("id");
 }
 
+/**
+ * Returns the time the notification was last updated.
+ *
+ * @param notificationElement
+ *            The notification element
+ * @returns The last update time of the notification
+ */
+function getNotificationLastUpdatedTime(notificationElement) {
+       return $(notificationElement).attr("lastUpdatedTime");
+}
+
 function likePost(postId) {
        $.getJSON("like.ajax", { "type": "post", "post" : postId, "formPassword": getFormPassword() }, function(data, textStatus) {
                if ((data == null) || !data.success) {