diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-18 05:54:32 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-18 05:54:32 -0500 |
| commit | 8fb8150c082662fd83d419d02eb837f02de6272a (patch) | |
| tree | 8d9f591c2880c2b3a65abf2f14704ea04c179a53 /www | |
| parent | cf183acfe0643660c2ea02eabe51d7fe08dd7bc7 (diff) | |
#131 - force terminating nph-zms connection
Former-commit-id: 63d742f41d4f6c4533b983cd86ce520ebc0aceae
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/ModalCtrl.js | 6 | ||||
| -rw-r--r-- | www/js/MonitorCtrl.js | 5 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 3 | ||||
| -rw-r--r-- | www/js/app.js | 16 |
4 files changed, 26 insertions, 4 deletions
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 1c2333af..a1934359 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -530,7 +530,8 @@ $scope.togglePresets = function() function outWithOld() { - + ZMDataModel.zmLog("Stopping network pull..."); + window.stop(); $scope.rand = Math.floor((Math.random() * 100000) + 1); $scope.animationInProgress = true; @@ -875,7 +876,8 @@ $scope.togglePresets = function() function outWithOld() { - + ZMDataModel.zmLog("Stopping network pull..."); + window.stop(); $scope.animationInProgress = true; // give digest time for image to swap // 100 should be enough diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index aaf10972..6d77b4fe 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -394,10 +394,13 @@ angular.module('zmApp.controllers') $scope.closeModal = function () { console.log("Close & Destroy Monitor Modal"); + + // stop networking -nph-zms keeps sucking data + // switch off awake, as liveview is finished ZMDataModel.setAwake(false); $scope.modal.remove(); - + $timeout (function() {ZMDataModel.zmLog("Stopping network pull...");window.stop();},50); }; //Cleanup the modal when we're done with it! $scope.$on('$destroy', function () { diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 98305eb1..f05967b2 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -662,7 +662,10 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' // $scope.isModalActive = false; // Note: no need to setAwake(false) as needs to be awake // in montage view + + $scope.modal.remove(); + $timeout (function() {ZMDataModel.zmLog("Stopping network pull...");window.stop();},50); $rootScope.rand = Math.floor((Math.random() * 100000) + 1); $scope.isModalActive = false; diff --git a/www/js/app.js b/www/js/app.js index c9bb9f9b..222d14db 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -289,6 +289,8 @@ angular.module('zmApp', [ } } } + + //console.log ("HTTP response"); return response; } @@ -892,8 +894,20 @@ angular.module('zmApp', [ zmAutoLogin.stop(); if ($rootScope.zmPopup) $rootScope.zmPopup.close(); + + + ZMDataModel.zmLog("Stopping network pull..."); + window.stop(); + //$ionicPopup.close(); - + + + /* if ($rootScope.platformOS == 'android') + { + ZMDataModel.zmLog("Android detected - calling stop"); + window.stop(); + //ionic.Platform.exitApp(); + }*/ }, false); |
