From 25e440861a7c31877f7ad0d4992cc0de6c0dce02 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Aug 2016 13:40:06 +0200 Subject: Added Wake-Sleep-Reset control commands Former-commit-id: 8ddfeea854f40464f43375a4f14dc11de92c4d30 --- www/css/style.css | 10 +++++++++- www/js/MonitorCtrl.js | 7 ++++++- www/js/MonitorModalCtrl.js | 21 ++++++++++++++++++++- www/js/MontageCtrl.js | 7 ++++++- www/lang/locale-en.json | 2 ++ www/lang/locale-it.json | 2 ++ www/lang/locale-pt.json | 2 ++ www/templates/monitors-modal.html | 13 +++++++++---- 8 files changed, 56 insertions(+), 8 deletions(-) (limited to 'www') diff --git a/www/css/style.css b/www/css/style.css index 1e6627b4..a7c57347 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -312,7 +312,15 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */ } -.ptzcenteredbutton +.ptzcenteredtopbutton +{ + position: absolute; + top: 20%; + left:50%; + transform: translate(-50%, -50%); +} + +.ptzcenteredbotbutton { position: absolute; top: 80%; diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 97110760..900084cb 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -346,6 +346,11 @@ angular.module('zmApp.controllers') $scope.LoginData = ZMDataModel.getLogin(); $rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -493,4 +498,4 @@ angular.module('zmApp.controllers') }; -}]); \ No newline at end of file +}]); diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index e4912294..e51f5af3 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1031,6 +1031,10 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ // function configurePTZ(mid) { + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -1060,6 +1064,21 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $http.get(myurl) .success(function (data) { + if (data.control.Control.CanWake == '1') + { + $scope.ptzWakeCommand = 'wake'; + } + + if (data.control.Control.CanSleep == '1') + { + $scope.ptzSleepCommand = 'sleep'; + } + + if (data.control.Control.CanReset == '1') + { + $scope.ptzResetCommand = 'reset'; + } + $scope.ptzMoveCommand = "move"; // start with as move; $scope.ptzStopCommand = ""; @@ -1174,4 +1193,4 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ }); -}]); \ No newline at end of file +}]); diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 6d93e753..c5ba05bd 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -664,6 +664,11 @@ function initPackery() $scope.LoginData = ZMDataModel.getLogin(); $rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -1154,4 +1159,4 @@ $scope.$on('$ionicView.afterEnter', function () { }; -}]); \ No newline at end of file +}]); diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 29fcd66f..f9ab5a1c 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -268,6 +268,7 @@ "kShowTip" :"show tip", "kShowing" :"Showing", "kShowingEvent" :"showing event", + "kSleep" :"Sleep", "kSpeed" :"speed", "kStart" :"Start", "kStateAreYouSure" :"Are you sure you want to ", @@ -308,6 +309,7 @@ "kVersion" :"Version", "kVersionIncompatible" :"I am incompatible with your ZoneMinder version", "kVideo" :"Video", + "kWake" :"Wake", "kWarningLargeTimeline" :"A large value can affect timeline performance. If you find timeline performance slow, try reducing the value to 200 and work your way up from there.", "kWeek" :"Week", "kWelcomeWizard" :"Welcome to zmWizard", diff --git a/www/lang/locale-it.json b/www/lang/locale-it.json index 61a871a3..fc32e5a9 100644 --- a/www/lang/locale-it.json +++ b/www/lang/locale-it.json @@ -266,6 +266,7 @@ "kShowTip" :"Mostra suggerimenti", "kShowing" :"Visualizzando", "kShowingEvent" :"Mostrando eventi", + "kSleep" :"Sleep", "kSpeed" :"Velocità", "kStart" :"Start", "kStateAreYouSure" :"Sei sicuro di voler ", @@ -305,6 +306,7 @@ "kVersion" :"Versione", "kVersionIncompatible" :"Non sono campatibile con la tua versione di Zoneminder", "kVideo" :"Video", + "kWake" :"Wake", "kWarningLargeTimeline" :"Un valore più alto influenza le prestazioni della timeline. Se le prestazioni sono basse, prova a ridurre il valore a 200.", "kWeek" :"Settimana", "kWelcomeWizard" :"Benvenuto al wizard!!!", diff --git a/www/lang/locale-pt.json b/www/lang/locale-pt.json index 77da2a76..1f635be1 100644 --- a/www/lang/locale-pt.json +++ b/www/lang/locale-pt.json @@ -266,6 +266,7 @@ "kShowTip" :"mostrar dica", "kShowing" :"Mostrando", "kShowingEvent" :"mostrando evento", + "kSleep" :"Sleep", "kSpeed" :"velocidade", "kStart" :"Começar", "kStateAreYouSure" :"Você tem a certeza que quer ", @@ -306,6 +307,7 @@ "kVersionIncompatible" :"Sou incompativel com a sua versão do ZoneMinder", "kVideo" :"Vídeo", "kWarningLargeTimeline" :"Um valor elevado pode afetar o desempenho da timeline. Se você achar o desempenho da timeline lento, tente reduzir o valor para 200 e trabalhe a partir daí.", + "kWake" :"Wake", "kWeek" :"Semana", "kWelcomeWizard" :"Benvindo ao Assistente", "kWizAuthText1" :"Confuso? Autenticação ZM, é a autenticação usada quando você habilita OPT_USE_AUTH no ecrã de opções da consola do ZM.", diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html index 053d9beb..9524b041 100644 --- a/www/templates/monitors-modal.html +++ b/www/templates/monitors-modal.html @@ -36,6 +36,13 @@
+ + +
@@ -44,13 +51,11 @@
- -
-
+
+ - @@ -132,4 +137,4 @@
{{monitorName}} {{monStatus}} 
-
\ No newline at end of file +
-- cgit v1.2.3