From b688f20a5ffa35bea6415b8d4f566d6cf7d9d6b0 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 16 Oct 2019 11:03:38 -0400 Subject: #854 toggle controls --- www/js/EventModalCtrl.js | 5 +++++ www/js/MomentCtrl.js | 2 +- www/js/MonitorModalCtrl.js | 8 +++++++- www/js/MontageCtrl.js | 14 ++++++++++++++ www/js/NVR.js | 2 +- www/templates/events-modal.html | 8 ++++++-- www/templates/monitors-modal.html | 10 ++++++---- 7 files changed, 40 insertions(+), 9 deletions(-) (limited to 'www') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index e15b2dc9..92eae748 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1075,9 +1075,14 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro }); + $scope.showHideControls = function () { + $scope.displayControls = !$scope.displayControls; + NVR.debug ('control display is:'+$scope.displayControls); + }; $scope.$on('modal.shown', function (e, m) { + $scope.displayControls = true; $ionicLoading.hide(); if (m.id != 'footage') return; diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index 186df5cd..c53974a3 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -8,7 +8,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$rootScope', '$ionicModal', 'NVR', '$ionicSideMenuDelegate', '$ionicHistory', '$state', '$translate', '$templateRequest', '$sce', '$compile', '$http', '$ionicLoading', 'zm', '$timeout', '$q', '$ionicPopover', '$ionicPopup', 'message', '$ionicScrollDelegate', function ($scope, $rootScope, $ionicModal, NVR, $ionicSideMenuDelegate, $ionicHistory, $state, $translate, $templateRequest, $sce, $compile, $http, $ionicLoading, zm, $timeout, $q, $ionicPopover, $ionicPopup, message, $ionicScrollDelegate) { - var masonry = null; +var masonry = null; var timeFrom; var timeTo; var moments = []; diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 1f0ce944..903c2e2a 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -5,6 +5,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$rootScope', 'zm', 'NVR', '$ionicSideMenuDelegate', '$timeout', '$interval', '$ionicModal', '$ionicLoading', '$http', '$state', '$stateParams', '$ionicHistory', '$ionicScrollDelegate', '$q', '$sce', 'carouselUtils', '$ionicPopup', 'SecuredPopups', '$translate', '$cordovaFile', function ($scope, $rootScope, zm, NVR, $ionicSideMenuDelegate, $timeout, $interval, $ionicModal, $ionicLoading, $http, $state, $stateParams, $ionicHistory, $ionicScrollDelegate, $q, $sce, carouselUtils, $ionicPopup, SecuredPopups, $translate, $cordovaFile) { + $scope.displayControls = true; $scope.animationInProgress = false; $scope.imageFit = true; $scope.isModalActive = true; @@ -1782,9 +1783,14 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ } - $scope.$on('modal.shown', function () { + $scope.showHideControls = function () { + $scope.displayControls = !$scope.displayControls; + NVR.debug ('control display is:'+$scope.displayControls); + }; + $scope.$on('modal.shown', function () { + $scope.displayControls = true; if (0 && $rootScope.platformOS == 'ios') { NVR.debug("Webkit hack, hammering window.stop();"); NVR.stopNetwork(); diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 6292bae9..edca6dbb 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -1065,6 +1065,20 @@ angular.module('zmApp.controllers') NVR.debug("MontageCtrl: switch minimal is " + $scope.minimal); // console.log("Hide Statusbar"); ionic.Platform.fullScreen($scope.minimal, !$scope.minimal); + + // hiding status bar messes up X + /*if ($scope.minimal) { + if ($rootScope.platformOS !='desktop') { + NVR.debug ('hiding device status bar'); + return StatusBar.hide(); + } + } else { + if ($rootScope.platformOS !='desktop') { + NVR.debug ('showing device status bar'); + return StatusBar.show(); + } + }*/ + //console.log ("minimal switch:Cancelling timer"); $interval.cancel(intervalHandleMontage); //we will renew on reload $interval.cancel(intervalHandleMontageCycle); diff --git a/www/js/NVR.js b/www/js/NVR.js index b8b3f57b..71d58df1 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -21,7 +21,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.078"; + var zmAppVersion = "1.3.079"; var isBackground = false; var justResumed = false; var timeSinceResumed = -1; diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 466cd18e..be971b52 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -35,6 +35,7 @@ @@ -42,7 +43,9 @@
@@ -73,6 +76,7 @@ vg-update-state="onPlayerState($state)" vg-update-playback="onPlaybackUpdate($playBack)" vg-plays-inline="videoObject.config.playsInline" vg-theme="videoObject.config.theme" vg-complete="playbackFinished()" + on-tap="showHideControls();" on-double-tap="closeModal();" vg-autoplay="videoObject.config.autoPlay" vg-responsive="videoObject.config.responsive" vg-update-time="videoTime(event.Event.StartTime,$currentTime)" vg-error="onVideoError($event)"> @@ -130,7 +134,7 @@ -
+
@@ -112,7 +113,8 @@
- - -
+
  • @@ -208,7 +210,7 @@
-
{{monitorName}}   +
{{monitorName}}    {{monStatus}} 
-- cgit v1.2.3