From 59e87770d8c7ffe45b55c31fd4b2acd49de00ecc Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 8 Oct 2015 14:53:07 -0400 Subject: alarm notifications in modal views added --- www/js/MontageCtrl.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'www/js') diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index dce5cd13..cc6edc1e 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -246,6 +246,23 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $state.go("events", {"id": 0}, { reload: true }); } }; + + $scope.handleAlarmsWhileMinimized = function() + { + $rootScope.isAlarm=!$rootScope.isAlarm; + + $scope.minimal = !$scope.minimal; + ZMDataModel.zmDebug("MontageCtrl: switch minimal is " + $scope.minimal); + ionic.Platform.fullScreen($scope.minimal, !$scope.minimal); + $interval.cancel(intervalHandle); + + if (!$rootScope.isAlarm) + { + $rootScope.alarmCount="0"; + $ionicHistory.nextViewOptions({disableBack: true}); + $state.go("events", {"id": 0}, { reload: true }); + } + }; //------------------------------------------------------------- // Called when user taps on the reorder button -- cgit v1.2.3