From 85a04ddab652b72780027aed2bc356f5f27b240d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 14 Apr 2011 20:00:31 +0200 Subject: [PATCH] Add method to return the last-updated time of a notification element. --- src/main/resources/static/javascript/sone.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index d58f17f..5232431 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -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) { -- 2.7.4