summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/css/style.css11
-rw-r--r--www/js/MonitorCtrl.js7
-rw-r--r--www/js/MonitorModalCtrl.js60
-rw-r--r--www/js/MontageCtrl.js7
-rw-r--r--www/lang/locale-en.json2
-rw-r--r--www/templates/monitors-modal.html9
6 files changed, 86 insertions, 10 deletions
diff --git a/www/css/style.css b/www/css/style.css
index 1e6627b4..1dad0bb5 100644
--- a/www/css/style.css
+++ b/www/css/style.css
@@ -312,7 +312,16 @@ http://www.cssportal.com/tryit/index.php?file=blog/css-notification-badge */
}
-.ptzcenteredbutton
+/* // not using for now, may come in handy later
+.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..cbfa972d 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 = "";
@@ -1048,17 +1052,46 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
.success (function (data)
{
$scope.isControllable = data.monitor.Monitor.Controllable;
+
+ // *** Only for testing - comment out //
+ //$scope.isControllable = '1';
// for testing only
// $scope.isControllable = 1;
$scope.controlid = data.monitor.Monitor.ControlId;
- if ($scope.isControllable=='1')
+ if ($scope.isControllable=='1' )
{
+
+
var apiurl = ZMDataModel.getLogin().apiurl;
var myurl = apiurl + "/controls/" + $scope.controlid + ".json";
ZMDataModel.zmDebug("configurePTZ : getting controllable data " + myurl);
$http.get(myurl)
.success(function (data) {
+
+ // *** Only for testing - comment out - start//
+ /*data.Control.Control.CanSleep = '1';
+ data.Control.Control.CanWake = '1';
+ data.Control.Control.CanReset = '1';
+ data.Control.Control.CanZoom = '1';
+ data.control.Control.HasPresets = '1';
+ data.control.Control.HasHomePreset = '1';*/
+ // *** Only for testing - comment out - end //
+
+ 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 = "";
@@ -1127,8 +1160,29 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$
if (data.control.Control.HasHomePreset == '1')
{
$scope.ptzPresets.unshift({name:'', icon:"ion-ios-home", cmd:'presetHome'});
+
+ }
+
+ // lets add these to the end
+ // strictly speaking, they aren't really presets, but meh for now
+
+ if (data.control.Control.CanWake == '1')
+ {
+
+ $scope.ptzPresets.push({name:'', icon:"ion-eye", cmd:'wake'});
- $scope.ptzPresetCount++;
+ }
+
+ if (data.control.Control.CanSleep == '1')
+ {
+ $scope.ptzPresets.push({name:'', icon:"ion-eye-disabled", cmd:'sleep'});
+
+ }
+
+ if (data.control.Control.CanReset == '1')
+ {
+ $scope.ptzPresets.push({name:'', icon:"ion-ios-loop-strong", cmd:'reset'});
+
}
}
@@ -1174,4 +1228,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/templates/monitors-modal.html b/www/templates/monitors-modal.html
index 053d9beb..7ae733e8 100644
--- a/www/templates/monitors-modal.html
+++ b/www/templates/monitors-modal.html
@@ -36,6 +36,9 @@
<div ng-show="isControllable=='1' && showPTZ">
+
+
+
<div class="ptzcentered">
<circular options="ptzRadialMenuOptions">
</circular>
@@ -44,13 +47,11 @@
<div ng-if="presetOn" class="ptzpresetbuttons animated fadeInDown" id="presetlist">
<div ng-repeat="preset in ptzPresets track by $index">
<button class="button {{preset.icon}} button-small button-royal" style="float:left;margin-right:10px;margin-bottom:10px;" ng-click="controlPTZ(monitorId, preset.cmd);">{{preset.name}}</button>
-
-
</div>
</div>
- <div class="ptzcenteredbutton">
+ <div class="ptzcenteredbotbutton">
<div ng-if="canZoom">
<a class="button button-small icon ion-search button-positive" href="" ng-click="controlPTZ(monitorId, zoomInCommand);">+</a>
<a class="button button-small icon ion-search button-positive" href="" ng-click="controlPTZ(monitorId, zoomOutCommand);">-</a>
@@ -132,4 +133,4 @@
<div class="monitor-modal-text">{{monitorName}}&nbsp;<span style="{{stateColor()}}">{{monStatus}}&nbsp;</span></div>
-</div> \ No newline at end of file
+</div>