From a3242f40e0bb123d2c75dd854d115dba80ea1496 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 3 Nov 2017 14:53:41 -0400 Subject: hide options for #554 --- www/css/style.css | 15 +- www/js/MonitorModalCtrl.js | 32 ++++ www/templates/monitors-modal.html | 343 ++++++++++++++++++++++---------------- 3 files changed, 241 insertions(+), 149 deletions(-) (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index 4c4af862..302e7b06 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -344,7 +344,7 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */ .ptzcenteredbotbutton { position: absolute; - top: 80%; + top: 85%; left: 50%; transform: translate(-50%, -50%); } @@ -1297,6 +1297,17 @@ fill-opacity: 0.8; fill: #1F3A93; } + + + +.ptzHalf { + height:50%; + display:block; +} + + + + @media (min-width:600px) { .montage-time { display: block !important; @@ -1313,7 +1324,7 @@ fill-opacity: 0.8; body { font-family: sans-serif; height:100%; - padding-top: constant(safe-area-inset-top); + } diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 2815cb2e..65f8f4df 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -20,6 +20,8 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ var _moveStart = false; var targetID = ""; $scope.imageZoomable = true; + $scope.ptzButtonsShown = true; + $scope.csize = ($rootScope.platformOS == 'desktop') ? 10:20; @@ -714,10 +716,27 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.controlPTZ = function(monitorId, cmd) { + + if (cmd == "special-hide-unhide") { + hideUnhidePresets(); + return; + } console.log ("PTZ command is"+cmd); controlPTZ(monitorId, cmd); }; + function hideUnhidePresets() { + console.log ("**********HIDEUNHIDE"); + $scope.ptzButtonsShown = !$scope.ptzButtonsShown; + + if ($scope.ptzPresets.length > 0) { + dirn = $scope.ptzButtonsShown ? "up":"down"; + + $scope.ptzPresets[0].icon = "ion-chevron-"+dirn; + } + + } + function controlPTZ(monitorId, cmd) { @@ -1587,6 +1606,9 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ NVRDataModel.debug("ConfigurePTZ Preset value is " + data.control.Control.HasPresets); $scope.ptzPresets = []; + + + if (data.control.Control.HasPresets == '1') { //$scope.presetAndControl = $translate.instant('kPresets'); @@ -1620,6 +1642,16 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ } + /* MAKE SURE THIS IS THE FIRST ICON */ + $scope.ptzPresets.unshift( + { + // name: 'W', + icon: "ion-chevron-up", + cmd: 'special-hide-unhide', + style: 'button-royal button-dark ', + }); + + } /*else { diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index 45b3a9d1..79f443da 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -1,160 +1,209 @@
- - - -
- - - -
-
-
- - - -
-
- -
-
-
- -
-
-
- - - - - -
-
-
- - - -
-
- -
-
-
- -
-
-
- - -
- - - - - - - - - -
- - - + + + + + + +
+ + + +
+
+
+ + + +
+
+ +
- -
-
- - +
+
-
- -
- -
-
+
+ + + + + + + + + +
+
+
+ + + +
+
+ +
-
-
- + - - - x -
-
- - {{controlToggle}} +
+
-
- - - -
-
    - -
  • -     -
  • - -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • - -
  • - -
  • - - -
  • - -
  • - -
  • - -
  • +
+ -
  • - -
  • + +
    + -
  • - -{{cycleText}} -
  • + - - +
  • + + + +
  • + +
  • + + + +
  • + +
  • + + + +
  • + +
  • + + -{{cycleText}} +
  • + + + + -
  • - -
  • - -
    -
    {{monitorName}}  {{monStatus}} 
    +
  • + + + +
  • + +
    +
    {{monitorName}}   + {{monStatus}}  +
    -- cgit v1.2.3