From 4fed2d6d267ff849de73e9971cb1062334a663db Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 14 May 2020 12:20:14 -0400 Subject: [PATCH 1/7] bump version to 1.34.13 for release --- distros/redhat/zoneminder.spec | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 10fd82e4f..73f66e958 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -28,7 +28,7 @@ %global _hardened_build 1 Name: zoneminder -Version: 1.34.12 +Version: 1.34.13 Release: 1%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons diff --git a/version b/version index 7355e24bb..9c9f16d07 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.34.12 +1.34.13 From 7a85be59be946cf9605360deaddd8b4c7fe45f42 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 10:22:58 -0400 Subject: [PATCH 2/7] Remove errant closing db debug output --- src/zmu.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/zmu.cpp b/src/zmu.cpp index b5e951100..ef8a9276e 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -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); From 94b29c6c7a86ab51671ea9a3b0ad13a69f6b58db Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 10:44:48 -0400 Subject: [PATCH 3/7] replace inline javascript in timeline zoom --- web/api/app/Plugin/Crud | 2 +- web/skins/classic/views/js/timeline.js | 5 ++++- web/skins/classic/views/timeline.php | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/api/app/Plugin/Crud b/web/api/app/Plugin/Crud index 0bd63fb46..c3976f147 160000 --- a/web/api/app/Plugin/Crud +++ b/web/api/app/Plugin/Crud @@ -1 +1 @@ -Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef +Subproject commit c3976f1478c681b0bbc132ec3a3e82c3984eeed5 diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js index 8d3f01d4c..cbebfc0d7 100644 --- a/web/skins/classic/views/js/timeline.js +++ b/web/skins/classic/views/js/timeline.js @@ -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); } diff --git a/web/skins/classic/views/timeline.php b/web/skins/classic/views/timeline.php index 794b99c20..2f1218b3e 100644 --- a/web/skins/classic/views/timeline.php +++ b/web/skins/classic/views/timeline.php @@ -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'])) ); ?> -
+
-
+
From 0dd426d64ce207a97cb2b8b529283176b6dcc527 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 11:33:10 -0400 Subject: [PATCH 4/7] handle range being set to an empty value. Fixes zoom out on timeline. Fix on-click to data-on-click --- web/skins/classic/views/timeline.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/skins/classic/views/timeline.php b/web/skins/classic/views/timeline.php index 2f1218b3e..cab313f52 100644 --- a/web/skins/classic/views/timeline.php +++ b/web/skins/classic/views/timeline.php @@ -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'])) ); ?> -
+
-
+
From 424a4ed0b12579f50fe92e3e69dd9b0e4b1db032 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 11:34:23 -0400 Subject: [PATCH 5/7] add onclick to div.zoom --- web/skins/classic/views/js/timeline.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/web/skins/classic/views/js/timeline.js b/web/skins/classic/views/js/timeline.js index cbebfc0d7..0b4d1d5fc 100644 --- a/web/skins/classic/views/js/timeline.js +++ b/web/skins/classic/views/js/timeline.js @@ -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'); @@ -197,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); }; + }); }); From c4c4c5bcbfa3aeb94f1f0947c0757f02750b2440 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 11:34:34 -0400 Subject: [PATCH 6/7] fix Crud submodule version --- web/api/app/Plugin/Crud | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/api/app/Plugin/Crud b/web/api/app/Plugin/Crud index c3976f147..0bd63fb46 160000 --- a/web/api/app/Plugin/Crud +++ b/web/api/app/Plugin/Crud @@ -1 +1 @@ -Subproject commit c3976f1478c681b0bbc132ec3a3e82c3984eeed5 +Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef From f79a17f3023169afee9adde5fc0d179aec14d928 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 15 May 2020 11:35:59 -0400 Subject: [PATCH 7/7] Bump version to 1.34.14 for release --- distros/redhat/zoneminder.spec | 2 +- version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 73f66e958..c3458074c 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -28,7 +28,7 @@ %global _hardened_build 1 Name: zoneminder -Version: 1.34.13 +Version: 1.34.14 Release: 1%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons diff --git a/version b/version index 9c9f16d07..46a99f18d 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.34.13 +1.34.14