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

47 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-09-02 21:28:08 +00:00
var requestQueue = new Request.Queue({
concurrent: monitorData.length,
stopOnFailure: false
});
function streamCmdQuit( ) {
if ( action ) {
2017-10-04 14:48:37 +00:00
streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT );
}
}
2020-09-25 15:52:13 +00:00
// Manage the Add New Zone button
function AddNewZone(el) {
url = el.getAttribute('data-url');
window.location.assign(url);
}
2020-09-02 21:28:08 +00:00
var monitors = new Array();
function initPage() {
2020-09-04 14:02:43 +00:00
for ( var i = 0, length = monitorData.length; i < length; i++ ) {
2020-09-02 21:28:08 +00: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-25 18:44:55 +00: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-02 21:28:08 +00:00
}
window.addEventListener('DOMContentLoaded', initPage);