summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/css/style.css22
-rw-r--r--www/js/ModalCtrl.js22
-rw-r--r--www/js/MonitorCtrl.js11
-rw-r--r--www/js/MontageCtrl.js2
-rw-r--r--www/templates/monitors-modal.html4
5 files changed, 38 insertions, 23 deletions
diff --git a/www/css/style.css b/www/css/style.css
index b45fd484..d542792c 100644
--- a/www/css/style.css
+++ b/www/css/style.css
@@ -210,6 +210,15 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */
transform: translate(-50%, -50%);
}
+.ptzcenteredbutton
+{
+ position: absolute;
+ top: 70%;
+ left:50%;
+ transform: translate(-50%, -50%);
+}
+
+
.timelinebuttons {
position: fixed; /* or absolute */
bottom:130px;
@@ -655,16 +664,3 @@ input[type=range]::-webkit-slider-thumb {
-webkit-animation-delay: 1s;
}
-.montage_image
-{
- margin-top:15px;
- width: 100% !important;
- height: auto !important;
-}
-
-.montage_image_full_screen
-{
- margin-top:0px;
- width: 100% !important;
- height: auto !important;
-} \ No newline at end of file
diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js
index 0e1385cf..f92c6474 100644
--- a/www/js/ModalCtrl.js
+++ b/www/js/ModalCtrl.js
@@ -100,7 +100,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Down');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Down');
}
},
@@ -109,7 +109,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'DownLeft');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'DownLeft');
}
},
@@ -119,7 +119,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Left');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Left');
}
},
{
@@ -136,7 +136,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'UpLeft');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'UpLeft');
}
},
@@ -145,7 +145,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Up');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Up');
}
},
@@ -154,7 +154,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'UpRight');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'UpRight');
}
},
@@ -171,7 +171,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'Right');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'Right');
}
},
@@ -181,7 +181,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
cssClass: 'fa fa-chevron-circle-up',
empty: false,
onclick: function () {
- controlPTZ($scope.monitorId, 'DownRight');
+ controlPTZ($scope.monitorId, $scope.ptzMoveCommand +'DownRight');
}
},
@@ -252,6 +252,10 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
// Send PTZ command to ZM
// Note: PTZ fails on desktop, don't bother about it
//-------------------------------------------------------------
+ $scope.controlPTZ = function (monitorId, cmd)
+ {
+ controlPTZ(monitorId, cmd);
+ };
function controlPTZ(monitorId, cmd) {
//curl -X POST "http://server.com/zm/index.php?view=request" -d
@@ -311,7 +315,7 @@ angular.module('zmApp.controllers').controller('ModalCtrl', ['$scope', '$rootSco
view: "request",
request: "control",
id: monitorId,
- control: $scope.ptzMoveCommand + cmd,
+ control: cmd,
xge: "30", //wtf
yge: "30", //wtf
}
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index dc24c4ae..7fcb8dac 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -312,18 +312,27 @@ angular.module('zmApp.controllers')
.success(function (data) {
$scope.ptzMoveCommand = "move"; // start with as move;
+ $scope.ptzStopCommand = "";
if (data.control.Control.CanMoveRel == '1')
+ {
$scope.ptzMoveCommand = "moveRel";
+ $scope.ptzStopCommand = "moveStop";
+ }
// Prefer con over rel if both enabled
// I've tested con
if (data.control.Control.CanMoveCon == '1')
+ {
$scope.ptzMoveCommand = "moveCon";
+ $scope.ptzStopCommand = "moveStop";
+ }
+
+
console.log("***moveCommand: " + $scope.ptzMoveCommand);
- ZMDataModel.zmLog("ControlDB reports PTZ command to be " + $scope.ptzMoveCommand);
+ ZMDataModel.zmLog("ControlDB reports PTZ command to be " + $scope.ptzMoveCommand + " and " + $scope.ptzStopCommand);
})
.error(function (data) {
console.log("** Error retrieving move PTZ command");
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index ae9a9680..d3a0928a 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -556,6 +556,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
$scope.LoginData = ZMDataModel.getLogin();
$rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111;
$scope.ptzMoveCommand = "";
+ $scope.ptzStopCommand = "";
// This is a modal to show the monitor footage
// We need to switch to always awake if set so the feed doesn't get interrupted
@@ -572,6 +573,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
.success(function (data) {
ZMDataModel.zmDebug("MontageCtrl: control data returned " + JSON.stringify(data));
$scope.ptzMoveCommand = (data.control.Control.CanMoveCon == '1') ? 'moveCon' : 'move';
+ $scope.ptzStopCommand = "moveStop";
console.log("***moveCommand: " + $scope.ptzMoveCommand);
ZMDataModel.zmLog("ControlDB reports PTZ command to be " + $scope.ptzMoveCommand);
})
diff --git a/www/templates/monitors-modal.html b/www/templates/monitors-modal.html
index f2a19a0f..1e5ae3cb 100644
--- a/www/templates/monitors-modal.html
+++ b/www/templates/monitors-modal.html
@@ -48,7 +48,11 @@
<div class="ptzcentered">
<circular options="radialMenuOptions">
</circular>
+
</div>
+
+ <a class="ptzcenteredbutton button button-small icon ion-stop button-assertive" href="" ng-click="controlPTZ(monitorId, ptzStopCommand);"></a>
+
</div>