summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/EventCtrl.js4
-rw-r--r--www/js/EventModalCtrl.js5
-rw-r--r--www/js/LoginCtrl.js3
-rw-r--r--www/js/MontageCtrl.js15
-rw-r--r--www/js/MontageHistoryCtrl.js6
5 files changed, 29 insertions, 4 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 75576a0f..502a568d 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -32,7 +32,7 @@ angular.module('zmApp.controllers')
})
- .controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'NVR', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$sce', '$cordovaBadge', '$cordovaLocalNotification', '$q', 'carouselUtils', '$translate', '$cordovaFileTransfer', '$cordovaFile', '$ionicListDelegate', 'ionPullUpFooterState', 'SecuredPopups', function ($scope, $rootScope, zm, NVR, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $sce, $cordovaBadge, $cordovaLocalNotification, $q, carouselUtils, $translate, $cordovaFileTransfer, $cordovaFile, $ionicListDelegate, ionPullUpFooterState,SecuredPopups) {
+ .controller('zmApp.EventCtrl', ['$scope', '$rootScope', 'zm', 'NVR', 'message', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$ionicPlatform', '$ionicSlideBoxDelegate', '$ionicPosition', '$ionicPopover', '$ionicPopup', 'EventServer', '$sce', '$cordovaBadge', '$cordovaLocalNotification', '$q', 'carouselUtils', '$translate', '$cordovaFileTransfer', '$cordovaFile', '$ionicListDelegate', 'ionPullUpFooterState', 'SecuredPopups', '$window', function ($scope, $rootScope, zm, NVR, message, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $ionicPlatform, $ionicSlideBoxDelegate, $ionicPosition, $ionicPopover, $ionicPopup, EventServer, $sce, $cordovaBadge, $cordovaLocalNotification, $q, carouselUtils, $translate, $cordovaFileTransfer, $cordovaFile, $ionicListDelegate, ionPullUpFooterState,SecuredPopups, $window) {
// events in last 5 minutes
// TODO https://server/zm/api/events/consoleEvents/5%20minute.json
@@ -182,6 +182,8 @@ angular.module('zmApp.controllers')
$scope.$on('$ionicView.beforeLeave', function () {
+ //$window.removeEventListener('orientationchange', updateUI);
+
if ($stateParams.lastCheckTime != undefined && $stateParams.lastCheckTime != '' && moment($stateParams.lastCheckTime).isValid()) {
NVR.debug ("removing montage temporary filter");
$rootScope.isEventFilterOn = false;
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index e91bea99..a6dd87e8 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -1125,6 +1125,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
});
+ $scope.$on('$ionicView.beforeLeave', function () {
+ document.removeEventListener("pause", onPause, false);
+ ddocument.removeEventListener("resume", onResume, false);
+ });
+
$scope.showHideControls = function () {
if (videoPlaybarClicked) {
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index e64d7a6f..9ba5e8bc 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -328,6 +328,9 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
$scope.$on('$ionicView.beforeLeave', function () {
//console.log("**VIEW ** LoginCtrl Entered");
+ document.removeEventListener("pause", onPause, false);
+ document.removeEventListener("resume", onResume, false);
+
var newLoginData = JSON.stringify($scope.loginData);
if ($scope.loginData.serverName && newLoginData != oldLoginData) {
NVR.log("Login data changed, saving...");
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 41b38e8c..8708970d 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -1734,7 +1734,11 @@ angular.module('zmApp.controllers')
NVR.debug("Deregistering handlers for multi-window");
window.MultiWindowPlugin.deregisterOnStop("montage-pause");
+ } else {
+ document.removeEventListener("pause", onPause, false);
+
}
+
if ($scope.modal) $scope.modal.remove();
});
@@ -2380,8 +2384,13 @@ angular.module('zmApp.controllers')
$state.go(s[0],s[1],s[2]);
});
- window.addEventListener("resize", jiggleMontage, false);
-
+ //window.addEventListener("resize", jiggleMontage, false);
+ $scope.$on('sizechanged', function() {
+ $timeout (function () {
+ jiggleMontage();
+ },10);
+
+ });
timeInMontage = new Date();
broadcastHandles = [];
@@ -2632,7 +2641,7 @@ angular.module('zmApp.controllers')
};
$scope.$on('$ionicView.beforeLeave', function () {
- window.removeEventListener("resize", jiggleMontage, false);
+ // window.removeEventListener("resize", jiggleMontage, false);
currentStreamState = streamState.STOPPED;
viewCleanup();
viewCleaned = true;
diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js
index 53a27b3c..501c0f48 100644
--- a/www/js/MontageHistoryCtrl.js
+++ b/www/js/MontageHistoryCtrl.js
@@ -1116,6 +1116,12 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc
viewCleanup();
viewCleaned = true;
+ //$window.removeEventListener('orientationchange', updateUI);
+
+ document.removeEventListener("pause", onPause, false);
+ document.removeEventListener("resume", onResume, false);
+
+
// if ($scope.modal) $scope.modal.remove();
NVR.log("Cancelling event query timer");