* The date and time of the last update (formatted for display)
*/
function updateSoneStatus(soneId, status, modified, lastUpdated) {
- $("#sone .sone#" + soneId).
+ $("#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);
+ $("#sone .sone." + soneId + " .last-update span.time").text(lastUpdated);
}
var watchedSones = {};
/* these functions are necessary for updating Sone statuses. */
$(document).ready(function() {
$("#sone .sone").each(function() {
- watchSone($(this).attr("id"));
+ watchSone($(this).find(".id").text());
});
});
</script>
-<div id="<% sone.id|html>" class="sone <% sone.status|html><%if sone.modified> modified<%/if>">
+<div class="sone <% sone.status|html><%if sone.modified> modified<%/if> <% sone.id|html>">
+ <div class="id"><% sone.id|html></div>
<div class="unknown-marker" title="<%= View.Sone.Status.Unknown|l10n|html>">?</div>
<div class="modified-marker" title="<%= View.Sone.Status.Modified|l10n|html>">!</div>
<div class="download-marker" title="<%= View.Sone.Status.Downloading|l10n|html>">⬊</div>