diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-08 14:13:40 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-08 14:13:40 -0400 |
| commit | ac992d9d8be5dd71e60c5650efe84c3f40a36e6e (patch) | |
| tree | b2acdabc5c773a61dffb8425e3c789e79b06d1bd /www/js/EventsGraphsCtrl.js | |
| parent | a5e032c1d38152644ffabead6536dd14b0433119 (diff) | |
badge notification count for events
Diffstat (limited to 'www/js/EventsGraphsCtrl.js')
| -rw-r--r-- | www/js/EventsGraphsCtrl.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js index fabe64a6..20782551 100644 --- a/www/js/EventsGraphsCtrl.js +++ b/www/js/EventsGraphsCtrl.js @@ -8,7 +8,7 @@ // the main function is generateChart. I call generate chart with required parameters // from the template file -angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ionicPlatform', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$rootScope', '$http', function ($ionicPlatform, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $rootScope, $http) { +angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ionicPlatform', '$scope', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$rootScope', '$http', '$ionicHistory', '$state', function ($ionicPlatform, $scope, zm, ZMDataModel, $ionicSideMenuDelegate, $rootScope, $http, $ionicHistory, $state) { console.log("Inside Graphs controller"); $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); @@ -17,6 +17,21 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni $scope.$on('$ionicView.loaded', function () { console.log("**VIEW ** Graph Ctrl Loaded"); }); + + + //---------------------------------------------------------------- + // 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 }); + } + }; //------------------------------------------------------------------------- // Lets make sure we set screen dim properly as we enter |
