diff options
Diffstat (limited to 'www/js/MonitorCtrl.js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 68ae0438..da73d52b 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -6,8 +6,8 @@ // refer to comments in EventCtrl for the modal stuff. They are almost the same angular.module('zmApp.controllers') - .controller('zmApp.MonitorCtrl', ['$ionicPopup', 'zm', '$scope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', - function ($ionicPopup, zm, $scope, ZMDataModel, message, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout) { + .controller('zmApp.MonitorCtrl', ['$ionicPopup', 'zm', '$scope', 'ZMDataModel', 'message', '$ionicSideMenuDelegate', '$ionicLoading', '$ionicModal', '$state', '$http', '$rootScope', '$timeout','$ionicHistory', + function ($ionicPopup, zm, $scope, ZMDataModel, message, $ionicSideMenuDelegate, $ionicLoading, $ionicModal, $state, $http, $rootScope, $timeout, $ionicHistory) { //----------------------------------------------------------------------- @@ -32,6 +32,21 @@ angular.module('zmApp.controllers') }; + //---------------------------------------------------------------- + // Alarm notification handling + //---------------------------------------------------------------- + $scope.handleAlarms = function() + { + $rootScope.isAlarm=!$rootScope.isAlarm; + if (!$rootScope.isAlarm) + { + $rootScope.alarmCount="0"; + $ionicHistory.nextViewOptions({disableBack: true}); + + + $state.go("events", {"id": 0}, { reload: true }); + } + }; //----------------------------------------------------------------------- // This function takes care of changing monitor parameters // For now, I've only limited it to enable/disable and change monitor mode |
