mirror of https://github.com/zlatinb/muwire
display a refresh link if the table needs updating
parent
2137d6d30b
commit
458dbec5fd
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue