summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventModalCtrl.js6
-rw-r--r--www/js/MomentCtrl.js2
-rw-r--r--www/js/TimelineCtrl.js7
3 files changed, 12 insertions, 3 deletions
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index bb5dce5e..d7bbfee8 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -1499,7 +1499,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
deleteEvent(id)
.then (function (succ) {
$ionicLoading.hide();
- $scope.modalData.doRefresh = true;
+ if ($scope.modalData) $scope.modalData.doRefresh = true;
var dirn = 1;
if (!$scope.nextId && $scope.prevId) dirn = -1;
@@ -1667,7 +1667,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
var ld = NVRDataModel.getLogin();
if (!ld.canSwipeMonitors) return;
- if ($state.current.name=="app.moment") {
+ /* if ($state.current.name=="app.moment") {
// console.log ("Searching for eid:"+eventId);
var i;
for (i=0; i < $scope.moments.length;i++) {
@@ -1680,7 +1680,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
maxAlarmFid = $scope.moments[i].Event.MaxScoreFrameId;
eventId = $scope.moments[i].Event.Id;
return;
- }
+ }*/
if (1) {
// NVRDataModel.log("using zms to move ");
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js
index 97f864b7..6bcf5476 100644
--- a/www/js/MomentCtrl.js
+++ b/www/js/MomentCtrl.js
@@ -570,6 +570,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
$scope.modal.remove();
}
+ if ($scope.modalData.doRefresh) getMoments(momentType, timeTo);
};
//----------------------------------------------------------------
@@ -597,6 +598,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
sl = 'enabled';
}
+ $scope.modalData = {doRefresh:false};
$ionicModal.fromTemplateUrl('templates/events-modal.html', {
scope: $scope,
animation: 'slide-in-up',
diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js
index 633fe454..5795d0a4 100644
--- a/www/js/TimelineCtrl.js
+++ b/www/js/TimelineCtrl.js
@@ -199,6 +199,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
sl = 'enabled';
}
+ $scope.modalData = {doRefresh:false};
$ionicModal.fromTemplateUrl('templates/events-modal.html',
{
scope: $scope, // give ModalCtrl access to this scope
@@ -243,6 +244,12 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla
$scope.modal.remove();
}
+ if ($scope.modalData.doRefresh) {
+
+ $timeout (function() {drawGraph ($scope.fromDate, $scope.toDate, maxItems );},500);
+
+ }
+
};
/* $scope.toggleGapless = function()