From: David ‘Bombe’ Roden Date: Sun, 24 Oct 2010 15:12:32 +0000 (+0200) Subject: Update the name of the Sone along with the status. X-Git-Tag: 0.1-RC1~41 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1e6962e0e811a7fa3983855e45180ec209193a93;p=Sone.git Update the name of the Sone along with the status. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 715f6c3..1d45493 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -99,7 +99,7 @@ function getTranslation(key, callback) { */ function getSoneStatus(soneId) { $.getJSON("ajax/getSoneStatus.ajax", {"sone": soneId}, function(data, textStatus) { - updateSoneStatus(soneId, data.status, data.modified, data.lastUpdated); + updateSoneStatus(soneId, data.name, data.status, data.modified, data.lastUpdated); /* seconds! */ updateInterval = 60; if (data.modified || (data.status == "downloading") || (data.status == "inserting")) { @@ -124,7 +124,7 @@ function getSoneStatus(soneId) { * @param lastUpdated * The date and time of the last update (formatted for display) */ -function updateSoneStatus(soneId, status, modified, lastUpdated) { +function updateSoneStatus(soneId, name, status, modified, lastUpdated) { $("#sone .sone." + soneId). toggleClass("unknown", status == "unknown"). toggleClass("idle", status == "idle"). @@ -132,6 +132,7 @@ function updateSoneStatus(soneId, status, modified, lastUpdated) { toggleClass("downloading", status == "downloading"). toggleClass("modified", modified); $("#sone .sone." + soneId + " .last-update span.time").text(lastUpdated); + $("#sone .sone." + soneId + " .profile-link a").text(name); } var watchedSones = {};