diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-21 20:10:28 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-21 20:10:28 -0400 |
| commit | aac1f8e7a84cf5e4f0603ef66433b91008365300 (patch) | |
| tree | 3f76110ae3d3e81fa299b20516d15fdeb9aab713 /www/js | |
| parent | 159c64886c10a25565353016f6190eb1f36259fb (diff) | |
#614 same behavior for event thumbnail
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 12 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 45b750b2..85421126 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -2814,6 +2814,9 @@ angular.module('zmApp.controllers') + + + $scope.showThumbnail = function (b,f) { if (!f) {// api update needed @@ -2859,6 +2862,11 @@ angular.module('zmApp.controllers') //earlier won't work //-------------------------------------------------------- + $scope.openModalWithSnapshot = function (event) { + openModal (event,'enabled'); + + }; + $scope.openModal = function(event) { @@ -2866,7 +2874,7 @@ angular.module('zmApp.controllers') }; - function openModal (event) { + function openModal (event, snapshot) { NVRDataModel.debug("unbinding eventCtrl watchers as modal has its own"); ionRangeWatcher(); mycarouselWatcher(); @@ -2891,6 +2899,8 @@ angular.module('zmApp.controllers') animation: 'slide-in-up', id: 'footage', showLive:sl, // seems bool is not allowed... + snapshot:snapshot, + eventId:event.Event.Id }) .then(function(modal) { diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 46fda660..5f37fa69 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -976,7 +976,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (m.snapshot == 'enabled') { isSnapShotEnabled = true; currentStreamState = streamState.SNAPSHOT; - maxAlarmFid = m.snapshotId; + if (m.snapshotId) maxAlarmFid = m.snapshotId; eventId = m.eventId; $scope.eventId = m.eventId; @@ -1480,12 +1480,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVRDataModel.debug ("Next is index:"+i+" maxScoreId:"+$scope.moments[i].Event.MaxScoreFrameId); maxAlarmFid = $scope.moments[i].Event.MaxScoreFrameId; eventId = $scope.moments[i].Event.Id; + return; } - if (currentStreamState == streamState.ACTIVE) { + if (1) { // NVRDataModel.log("using zms to move "); - if ($scope.defaultVideo == '' || $scope.defaultVideo == 'undefined') { + if (currentStreamState == streamState.ACTIVE && ($scope.defaultVideo == '' || $scope.defaultVideo == 'undefined')) { // need to kill zms currentStreamState = streamState.STOPPED; $timeout (function() { |
