zoneminder/web/skins/classic/views/js/stats.js

22 lines
599 B
JavaScript
Raw Normal View History

2020-08-23 03:43:53 +08:00
function initPage() {
2020-08-24 01:23:58 +08:00
var backBtn = $j('#backBtn');
2020-08-24 02:02:35 +08:00
2020-08-24 01:23:58 +08:00
// Disable the back button if there is nothing to go back to
backBtn.prop('disabled', !document.referrer.length);
2020-08-23 03:43:53 +08:00
// Manage the BACK button
2020-08-24 01:23:58 +08:00
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
2020-08-23 03:43:53 +08:00
evt.preventDefault();
window.history.back();
});
2020-08-24 01:23:58 +08:00
// Manage the REFRESH Button
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
evt.preventDefault();
window.location.reload(true);
});
2020-08-23 03:43:53 +08:00
}
$j(document).ready(function() {
initPage();
});