From bbc2e7deb5cd0a31e49b033fbc534cc6c8611ece Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Fri, 15 Jan 2016 14:20:37 +0530 Subject: #131 - make sure images are not pulled in background mode Former-commit-id: 115c74770f9023d1acebb0987bd855e2b310fa45 --- www/js/ModalCtrl.js | 14 ++++++++++++++ www/js/MontageCtrl.js | 14 ++++++++++++++ www/templates/monitors-modal.html | 4 ++-- www/templates/montage.html | 9 ++++----- 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 8d36d467..aafaa355 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -306,6 +306,20 @@ $scope.togglePresets = function() }; + + //------------------------------------------------------------- + // this is checked to make sure we are not pulling images + // when app is in background. This is a problem with Android, + // for example + //------------------------------------------------------------- + + $scope.isBackground = function() + { + console.log ("Is background called from ModalCtrl and returned " + + ZMDataModel.isBackground()); + return ZMDataModel.isBackground(); + }; + //------------------------------------------------------------- // Send PTZ command to ZM // Note: PTZ fails on desktop, don't bother about it diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index e5f42a00..1cf9efd9 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -290,6 +290,20 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $state.go("events", {"id": 0}, { reload: true }); } }; + + + //------------------------------------------------------------- + // this is checked to make sure we are not pulling images + // when app is in background. This is a problem with Android, + // for example + //------------------------------------------------------------- + + $scope.isBackground = function() + { + console.log ("Is background called from Montage and returned " + + ZMDataModel.isBackground()); + return ZMDataModel.isBackground(); + }; //------------------------------------------------------------- // Called when user taps on the reorder button diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index 5b7d5670..e5beecfd 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -17,7 +17,7 @@
-
+
-
+
- +
- - -
+
+
-- cgit v1.2.3