summaryrefslogtreecommitdiff
path: root/www/js/LogCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/LogCtrl.js')
-rw-r--r--www/js/LogCtrl.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js
index 9a84661a..2858e289 100644
--- a/www/js/LogCtrl.js
+++ b/www/js/LogCtrl.js
@@ -26,16 +26,7 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
loadLogs();
}
- $scope.$on ( "process-push", function () {
- NVRDataModel.debug (">> LogCtrl: push handler");
- var s = NVRDataModel.evaluateTappedNotification();
- NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s));
- $ionicHistory.nextViewOptions({
- disableAnimate:true,
- disableBack: true
- });
- $state.go(s[0],s[1],s[2]);
- });
+
$scope.flipLogs = function () {
if ($scope.logEntity == 'ZoneMinder')
@@ -267,6 +258,22 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo
// reset power state on exit as if it is called after we enter another
// state, that effectively overwrites current view power management needs
//------------------------------------------------------------------------
+
+
+ $scope.$on('$ionic.beforeEnter', function () {
+
+ $scope.$on ( "process-push", function () {
+ NVRDataModel.debug (">> LogCtrl: push handler");
+ var s = NVRDataModel.evaluateTappedNotification();
+ NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s));
+ $ionicHistory.nextViewOptions({
+ disableAnimate:true,
+ disableBack: true
+ });
+ $state.go(s[0],s[1],s[2]);
+ });
+ });
+
$scope.$on('$ionicView.enter', function () {
//console.log("**VIEW ** Log Ctrl Entered");