diff options
| -rw-r--r-- | www/js/EventServer.js | 11 | ||||
| -rw-r--r-- | www/js/EventServerSettingsCtrl.js | 25 | ||||
| -rw-r--r-- | www/js/PortalLoginCtrl.js | 3 |
3 files changed, 21 insertions, 18 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 77287feb..8d7fd65e 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -471,6 +471,17 @@ angular.module('zmApp.controllers') $rootScope.alarmCount = "0"; $rootScope.isAlarm = 0; $rootScope.tappedNotification = 1; + + if ($rootScope.platformOS == 'ios') + { + ZMDataModel.zmDebug ("iOS only: clearing background push"); + push.finish(function() { + ZMDataModel.zmDebug ("Finished background push"); + }, function() { + ZMDataModel.zmDebug ("background push error"); + }, 'push-1'); + } + } else { // this flag honors the HW mute button. Go figure diff --git a/www/js/EventServerSettingsCtrl.js b/www/js/EventServerSettingsCtrl.js index fbde9f9b..e2456c2b 100644 --- a/www/js/EventServerSettingsCtrl.js +++ b/www/js/EventServerSettingsCtrl.js @@ -69,34 +69,25 @@ angular.module('zmApp.controllers').controller('zmApp.EventServerSettingsCtrl', buttons: [ { text: 'Cancel', - onTap: function (e) { - return "CANCEL"; - } + }, { text: 'OK', onTap: function (e) { - return "OK"; + + ld.onTapScreen = $scope.myopt.selectedState; + ZMDataModel.zmLog("Setting new onTap State:"+ld.onTapScreen); + ZMDataModel.setLogin(ld); + $scope.defScreen = $scope.myopt.selectedState; + } } ] }); - // It seems invoking a popup within a popup handler - // causes issues. Doing this outside due to that reason - $rootScope.zmPopup.then(function (res) { - - if (res == "OK") { - ld.onTapScreen = $scope.myopt.selectedState; - ZMDataModel.zmDebug("Setting new onTap State:"); - ZMDataModel.setLogin(ld); - $scope.defScreen = $scope.myopt.selectedState; - // if ($scope.myopt.selectedState != "") - // controlZM($scope.myopt.selectedState); - } - }); + }; //---------------------------------------------------------------- diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index 5ac5aed6..13224271 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -184,8 +184,9 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic if ($rootScope.tappedNotification) { + var ld = ZMDataModel.getLogin(); - + ZMDataModel.zmLog ("Came via push tap. onTapScreen="+ld.onTapScreen); //console.log ("***** NOTIFICATION TAPPED "); $rootScope.tappedNotification = 0; $ionicHistory.nextViewOptions({disableBack: true}); |
