mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-10 18:06:52 -04:00
Merge branch 'release-1.34'
This commit is contained in:
@@ -198,7 +198,6 @@ bool ValidateAccess(User *user, int mon_id, int function) {
|
||||
|
||||
void exit_zmu(int exit_code) {
|
||||
logTerm();
|
||||
printf("closing db\n");
|
||||
zmDbClose();
|
||||
|
||||
exit(exit_code);
|
||||
|
||||
@@ -36,14 +36,14 @@ function createEventHtml(zm_event, frame) {
|
||||
return eventHtml;
|
||||
}
|
||||
|
||||
function showEventDetail( eventHtml ) {
|
||||
$('instruction').addClass( 'hidden' );
|
||||
function showEventDetail(eventHtml) {
|
||||
$('instruction').addClass('hidden');
|
||||
$('eventData').empty();
|
||||
$('eventData').adopt( eventHtml );
|
||||
$('eventData').removeClass( 'hidden' );
|
||||
$('eventData').adopt(eventHtml);
|
||||
$('eventData').removeClass('hidden');
|
||||
}
|
||||
|
||||
function eventDataResponse( respObj, respText ) {
|
||||
function eventDataResponse(respObj, respText) {
|
||||
var zm_event = respObj.event;
|
||||
if ( !zm_event ) {
|
||||
console.log('Null event');
|
||||
@@ -179,7 +179,10 @@ function loadEventImage( imagePath, eid, fid, width, height, fps, videoName, dur
|
||||
eventData.addEvent('click', showEvent.pass());
|
||||
}
|
||||
|
||||
function tlZoomBounds( minTime, maxTime ) {
|
||||
function tlZoomBounds(event) {
|
||||
var target = event.target;
|
||||
var minTime = target.getAttribute('data-zoom-min-time');
|
||||
var maxTime = target.getAttribute('data-zoom-max-time');
|
||||
location.replace('?view='+currentView+filterQuery+'&minTime='+minTime+'&maxTime='+maxTime);
|
||||
}
|
||||
|
||||
@@ -194,14 +197,18 @@ function tlPanRight() {
|
||||
location.replace('?view='+currentView+filterQuery+'&midTime='+maxTime+'&range='+range);
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
document.querySelectorAll("div.event").forEach(function(el) {
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
// These look like the code in skin.js, but that code doesn't select for divs.
|
||||
document.querySelectorAll('div.event').forEach(function(el) {
|
||||
el.onclick = window[el.getAttribute('data-on-click-this')].bind(el, el);
|
||||
el.onmouseover = window[el.getAttribute('data-on-mouseover-this')].bind(el, el);
|
||||
});
|
||||
document.querySelectorAll("div.activity").forEach(function(el) {
|
||||
document.querySelectorAll('div.activity').forEach(function(el) {
|
||||
el.onclick = window[el.getAttribute('data-on-click-this')].bind(el, el);
|
||||
el.onmouseover = window[el.getAttribute('data-on-mouseover-this')].bind(el, el);
|
||||
});
|
||||
document.querySelectorAll('div.zoom').forEach(function(el) {
|
||||
el.onclick = function(ev) { window[el.getAttribute('data-on-click')](ev); };
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ if ( isset($_REQUEST['midTime']) )
|
||||
if ( isset($_REQUEST['maxTime']) )
|
||||
$maxTime = validHtmlStr($_REQUEST['maxTime']);
|
||||
|
||||
if ( isset($range) ) {
|
||||
if ( isset($range) and validInt($range) ) {
|
||||
$halfRange = (int)($range/2);
|
||||
if ( isset($midTime) ) {
|
||||
$midTimeT = strtotime($midTime);
|
||||
@@ -616,7 +616,7 @@ function drawXGrid( $chart, $scale, $labelClass, $tickClass, $gridClass, $zoomCl
|
||||
$zoomMinTime = strftime( STRF_FMT_DATETIME_DB, (int)($chart['data']['x']['lo'] + ($lastTick * $chart['data']['x']['density'])) );
|
||||
$zoomMaxTime = strftime( STRF_FMT_DATETIME_DB, (int)($chart['data']['x']['lo'] + ($i * $chart['data']['x']['density'])) );
|
||||
?>
|
||||
<div class="<?php echo $zoomClass ?>" style="left: <?php echo 100*($lastTick-1)/$chart['graph']['width'] ?>%; width: <?php echo round(100*($i-$lastTick)/$chart['graph']['width'],1) ?>%;" title="<?php echo translate('ZoomIn') ?>" onclick="tlZoomBounds( '<?php echo $zoomMinTime ?>', '<?php echo $zoomMaxTime ?>' )"></div>
|
||||
<div class="<?php echo $zoomClass ?>" style="left: <?php echo 100*($lastTick-1)/$chart['graph']['width'] ?>%; width: <?php echo round(100*($i-$lastTick)/$chart['graph']['width'],1) ?>%;" title="<?php echo translate('ZoomIn') ?>" data-on-click="tlZoomBounds" data-zoom-min-time="<?php echo $zoomMinTime ?>" data-zoom-max-time="<?php echo $zoomMaxTime ?>"></div>
|
||||
<?php
|
||||
}
|
||||
$lastTick = $i;
|
||||
@@ -629,7 +629,7 @@ function drawXGrid( $chart, $scale, $labelClass, $tickClass, $gridClass, $zoomCl
|
||||
$zoomMinTime = strftime( STRF_FMT_DATETIME_DB, (int)($chart['data']['x']['lo'] + ($lastTick * $chart['data']['x']['density'])) );
|
||||
$zoomMaxTime = strftime( STRF_FMT_DATETIME_DB, (int)($chart['data']['x']['lo'] + ($i * $chart['data']['x']['density'])) );
|
||||
?>
|
||||
<div class="<?php echo $zoomClass ?>" style="left: <?php echo $lastTick-1 ?>px; width: <?php echo $i-$lastTick ?>px;" title="<?php echo translate('ZoomIn') ?>" onclick="tlZoomBounds( '<?php echo $zoomMinTime ?>', '<?php echo $zoomMaxTime ?>' )"></div>
|
||||
<div class="<?php echo $zoomClass ?>" style="left: <?php echo $lastTick-1 ?>px; width: <?php echo $i-$lastTick ?>px;" title="<?php echo translate('ZoomIn') ?>" data-on-click="tlZoomBounds" data-zoom-min-time="<?php echo $zoomMinTime ?>" data-zoom-max-time="<?php echo $zoomMaxTime ?>"></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user