From: David ‘Bombe’ Roden Date: Thu, 14 Apr 2011 18:00:31 +0000 (+0200) Subject: Add method to return the last-updated time of a notification element. X-Git-Tag: 0.6.2^2~19^2~2 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=85a04ddab652b72780027aed2bc356f5f27b240d Add method to return the last-updated time of a notification element. --- 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) {