update the watch view header
This commit is contained in:
parent
4f56f9d82b
commit
f98a885ed5
|
@ -1,3 +1,5 @@
|
||||||
|
var backBtn = $j('#backBtn');
|
||||||
|
var settingsBtn = $j('#settingsBtn');
|
||||||
|
|
||||||
function showEvents() {
|
function showEvents() {
|
||||||
$('ptzControls').addClass('hidden');
|
$('ptzControls').addClass('hidden');
|
||||||
|
@ -904,6 +906,29 @@ function initPage() {
|
||||||
} else if ( monitorRefresh > 0 ) {
|
} else if ( monitorRefresh > 0 ) {
|
||||||
setInterval(reloadWebSite, monitorRefresh*1000);
|
setInterval(reloadWebSite, monitorRefresh*1000);
|
||||||
}
|
}
|
||||||
|
// Manage the BACK button
|
||||||
|
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
window.history.back();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Don't enable the back button if there is no previous zm page to go back to
|
||||||
|
backBtn.prop('disabled', !document.referrer.length);
|
||||||
|
|
||||||
|
// Manage the REFRESH Button
|
||||||
|
document.getElementById("refreshBtn").addEventListener("click", function onRefreshClick(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
window.location.reload(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Manage the SETTINGS button
|
||||||
|
document.getElementById("settingsBtn").addEventListener("click", function onSettingsClick(evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
$j('#settingsModal').modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Only enable the settings button for local cameras
|
||||||
|
settingsBtn.prop('disabled', !(monitorType == 'Local' && canViewControl));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Kick everything off
|
// Kick everything off
|
||||||
|
|
|
@ -59,23 +59,21 @@ noCacheHeaders();
|
||||||
xhtmlHeaders(__FILE__, $monitor->Name().' - '.translate('Feed'));
|
xhtmlHeaders(__FILE__, $monitor->Name().' - '.translate('Feed'));
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<div id="page">
|
<?php echo getNavBarHTML() ?>
|
||||||
<?php if ( !$popup ) echo getNavBarHTML() ?>
|
<div class="d-flex flex-row justify-content-between px-3 py-1">
|
||||||
<div id="header">
|
<div>
|
||||||
<div id="monitorName"><?php echo validHtmlStr($monitor->Name()) ?></div>
|
<button id="backBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Back') ?>" disabled><i class="fa fa-arrow-left"></i></button>
|
||||||
<div id="menuControls">
|
<button id="refreshBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Refresh') ?>" ><i class="fa fa-refresh"></i></button>
|
||||||
<?php
|
<button id="settingsBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Settings') ?>" disabled><i class="fa fa-sliders"></i></button>
|
||||||
if ( canView('Control') && $monitor->Type() == 'Local' ) {
|
|
||||||
?>
|
|
||||||
<div id="settingsControl">
|
|
||||||
<button type="button" data-toggle="modal" data-target="#settingsModal"><?php echo translate('Settings') ?></button>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
}
|
<div>
|
||||||
?>
|
<h2><?php echo validHtmlStr($monitor->Name()) ?></h2>
|
||||||
<div id="scaleControl"><?php echo translate('Scale').': '.htmlSelect('scale', $scales, $scale, array('id'=>'scale')); ?></div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php echo translate('Scale').': '.htmlSelect('scale', $scales, $scale, array('id'=>'scale')); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="closeControl"><a href="#" data-on-click="<?php echo $popup ? 'closeWindow' : 'backWindow' ?>"><?php echo $popup ? translate('Close') : translate('Back') ?></a></div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ( $monitor->Status() != 'Connected' and $monitor->Type() != 'WebSite' ) {
|
if ( $monitor->Status() != 'Connected' and $monitor->Type() != 'WebSite' ) {
|
||||||
|
|
Loading…
Reference in New Issue