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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.2 KiB
JavaScript
Raw Normal View History

2020-09-03 05:28:08 +08:00
function streamCmdQuit( ) {
if ( action ) {
2017-10-04 22:48:37 +08:00
streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT );
}
}
2020-09-25 23:52:13 +08:00
// Manage the Add New Zone button
function AddNewZone(el) {
url = el.getAttribute('data-url');
window.location.assign(url);
}
2020-09-03 05:28:08 +08:00
var monitors = new Array();
function initPage() {
2020-09-04 22:02:43 +08:00
for ( var i = 0, length = monitorData.length; i < length; i++ ) {
2020-09-03 05:28:08 +08:00
monitors[i] = new MonitorStream(monitorData[i]);
// Start the fps and status updates. give a random delay so that we don't assault the server
var delay = Math.round( (Math.random()+0.5)*statusRefreshTimeout );
monitors[i].start(delay);
}
2020-09-26 02:44:55 +08:00
// Manage the BACK button
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
evt.preventDefault();
window.history.back();
});
// Disable the back button if there is nothing to go back to
$j('#backBtn').prop('disabled', !document.referrer.length);
// Manage the REFRESH Button
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
evt.preventDefault();
window.location.reload(true);
});
2020-09-03 05:28:08 +08:00
}
window.addEventListener('DOMContentLoaded', initPage);