From 206d3f7dcefd486d1927251a3c062d6b0e198e2e Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 24 Jul 2018 15:02:18 -0400 Subject: #674 destroy modal if new event tapped --- www/js/EventCtrl.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'www') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 81bf4cb2..c2d0125e 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1084,6 +1084,10 @@ angular.module('zmApp.controllers') //---------------------------------------------------------------- $scope.handleAlarms = function () { // $rootScope.isAlarm = !$rootScope.isAlarm; + + if ($scope.modal !== undefined) { + $scope.modal.remove(); + } if ($rootScope.isAlarm) { $rootScope.alarmCount = "0"; $rootScope.isAlarm = !$rootScope.isAlarm; @@ -1099,6 +1103,7 @@ angular.module('zmApp.controllers') { reload: true }); */ + getInitialEvents(); return; } -- cgit v1.2.3