display a refresh link if the table needs updating
This commit is contained in:
@@ -24,10 +24,12 @@ function refreshStatus() {
|
||||
hashingSpan.innerHTML = "";
|
||||
|
||||
var newRevision = xmlDoc.getElementsByTagName("Revision")[0].childNodes[0].nodeValue
|
||||
var refreshDiv = document.getElementById("refresh-link")
|
||||
if (newRevision > tableRevision) {
|
||||
tableRevision = newRevision
|
||||
// TODO: let the user know they can refresh the table
|
||||
}
|
||||
refreshDiv.innerHTML = "<a href='#' onclick='refreshTable();return false;'>Refresh</a>"
|
||||
} else
|
||||
refreshDiv.innerHTML = ""
|
||||
}
|
||||
}
|
||||
xmlhttp.open("GET", "/MuWire/Files?section=status", true)
|
||||
|
||||
@@ -52,6 +52,7 @@ if (viewAs == null)
|
||||
<div id="root"></div>
|
||||
</ul>
|
||||
<% } else { %>
|
||||
<div id="refresh-link"></div>
|
||||
<div id="table-wrapper">
|
||||
<div id="table-scroll">
|
||||
<div id="filesTable"></div>
|
||||
|
||||
Reference in New Issue
Block a user