Update the last update date, too.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 21 Oct 2010 12:12:44 +0000 (14:12 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 21 Oct 2010 12:12:44 +0000 (14:12 +0200)
src/main/resources/templates/include/viewSone.html

index af7c8be..e054122 100644 (file)
@@ -2,20 +2,21 @@
 
        function getStatus(soneId) {
                $.getJSON("ajax/getSoneStatus.ajax", {"sone": soneId}, function(data, textStatus) {
-                       updateStatus(soneId, data.status, data.modified);
+                       updateStatus(soneId, data.status, data.modified, data.lastUpdated);
                        setTimeout(function() {
                                getStatus(soneId);
                        }, 5000);
                });
        }
 
-       function updateStatus(soneId, status, modified) {
+       function updateStatus(soneId, status, modified, lastUpdated) {
                $("#sone .sone#" + soneId).
                        toggleClass("unknown", status == "unknown").
                        toggleClass("idle", status == "idle").
                        toggleClass("inserting", status == "inserting").
                        toggleClass("downloading", status == "downloading").
                        toggleClass("modified", modified);
+               $("#sone .sone#" + soneId + " .last-update span.time").text(lastUpdated);
        }
 
        $(document).ready(function() {
@@ -31,7 +32,7 @@
        <div class="download-marker" title="<%= View.Sone.Status.Downloading|l10n|html>">⬊</div>
        <div class="insert-marker" title="<%= View.Sone.Status.Inserting|l10n|html>">⬈</div>
        <div class="idle-marker" title="<%= View.Sone.Status.Idle|l10n|html>">✔</div>
-       <div class="last-update"><%= View.Sone.Label.LastUpdate|l10n|html> <% sone.time|date format="MMM d, yyyy, HH:mm:ss"></div>
+       <div class="last-update"><%= View.Sone.Label.LastUpdate|l10n|html> <span class="time"><% sone.time|date format="MMM d, yyyy, HH:mm:ss"></span></div>
        <div class="profile-link"><a href="viewSone.html?sone=<% sone.id|html>" title="<% sone.requestUri|html>"><% sone.niceName|html></a></div>
        <div class="short-request-uri"><% sone.requestUri|substring start=4 length=43|html></div>
        <%ifnull ! currentSone>