diff options
Diffstat (limited to 'www/js/DevOptionsCtrl.js')
| -rw-r--r-- | www/js/DevOptionsCtrl.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js index 98ee9160..f64613e4 100644 --- a/www/js/DevOptionsCtrl.js +++ b/www/js/DevOptionsCtrl.js @@ -2,12 +2,26 @@ /* jslint browser: true*/ /* global cordova,StatusBar,angular,console */ -angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', function ($scope, $rootScope, $ionicModal, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading) { +angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope', '$rootScope', '$ionicModal', 'zm', 'ZMDataModel', '$ionicSideMenuDelegate', '$ionicPopup', '$http', '$q', '$ionicLoading', '$ionicHistory','$state', function ($scope, $rootScope, $ionicModal, zm, ZMDataModel, $ionicSideMenuDelegate, $ionicPopup, $http, $q, $ionicLoading, $ionicHistory, $state) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); }; + + //---------------------------------------------------------------- + // 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 |
