add back & refresh buttons to zone view
parent
d66b0be1bb
commit
8018bd4ed9
|
@ -669,6 +669,21 @@ function initPage() {
|
|||
el.addEventListener("load", imageLoadEvent, {passive: true});
|
||||
});
|
||||
window.addEventListener("resize", drawZonePoints, {passive: true});
|
||||
|
||||
// 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);
|
||||
});
|
||||
} // initPage
|
||||
|
||||
function imageLoadEvent() {
|
||||
|
|
|
@ -120,8 +120,14 @@ xhtmlHeaders(__FILE__, translate('Zone'));
|
|||
<body>
|
||||
<?php echo getNavBarHTML() ?>
|
||||
<div id="page">
|
||||
<div id="header">
|
||||
<h2><?php echo translate('Monitor').' '.$monitor->Name().' - '.translate('Zone').' '.$newZone['Name'] ?></h2>
|
||||
<div class="w-100">
|
||||
<div class="float-left pl-3 pt-1">
|
||||
<button type="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>
|
||||
<button type="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>
|
||||
</div>
|
||||
<div class="w-100 pt-2">
|
||||
<h2><?php echo translate('Monitor').' '.$monitor->Name().' - '.translate('Zone').' '.$newZone['Name'] ?></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<form name="zoneForm" id="zoneForm" method="post" action="?">
|
||||
|
|
Loading…
Reference in New Issue