diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-01-24 09:34:47 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-01-24 09:34:47 -0500 |
| commit | 02596e5821ba01672763b5faf5375de415de3bf4 (patch) | |
| tree | 2cc7c2a1ea2dbc055f39682f6293b2bcd65f7b6c | |
| parent | 92faf1cd858447e7e8d3db0a3b3d2396934c5e4b (diff) | |
#587 - option added to dev settings to make this configurable
| -rwxr-xr-x | www/js/DataModel.js | 8 | ||||
| -rw-r--r-- | www/js/EventCtrl.js | 8 | ||||
| -rw-r--r-- | www/js/MomentCtrl.js | 7 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 9 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 1 | ||||
| -rw-r--r-- | www/templates/devoptions.html | 6 |
6 files changed, 37 insertions, 2 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 47ec1156..f63e6c8a 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -173,6 +173,7 @@ angular.module('zmApp.controllers') 'momentMonitorFilter': [], 'enableMomentSubMenu': true, 'momentArrangeBy': 'StartTime', + 'showLiveForInProgressEvents': true }; @@ -1052,6 +1053,13 @@ angular.module('zmApp.controllers') } + if (typeof loginData.showLiveForInProgressEvents == 'undefined') { + + loginData.showLiveForInProgressEvents = true; + + } + + diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index a2a3cec0..90eb90bf 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -2859,12 +2859,18 @@ angular.module('zmApp.controllers') $scope.currentEvent = event; $scope.followSameMonitor = ($stateParams.id == "0") ? "0" : "1"; + var ld = NVRDataModel.getLogin(); + var sl = 'disabled'; + if (ld.showLiveForInProgressEvents) { + sl = 'enabled'; + } + $ionicModal.fromTemplateUrl('templates/events-modal.html', { scope: $scope, animation: 'slide-in-up', id: 'footage', - showLive:'disabled', // seems bool is not allowed... + showLive:sl, // seems bool is not allowed... }) .then(function(modal) { diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index abd41d53..97fcd6d4 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -575,10 +575,17 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ index: 1 }; + var ld = NVRDataModel.getLogin(); + var sl = 'disabled'; + if (ld.showLiveForInProgressEvents) { + sl = 'enabled'; + } + $ionicModal.fromTemplateUrl('templates/events-modal.html', { scope: $scope, animation: 'slide-in-up', id: 'footage', + showLive:sl, }) .then(function (modal) { $scope.modal = modal; diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 81db5991..a4a564d0 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -192,11 +192,18 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla //prepareModalEvent(event.Event.Id); + var ld = NVRDataModel.getLogin(); + var sl = 'disabled'; + if (ld.showLiveForInProgressEvents) { + sl = 'enabled'; + } + $ionicModal.fromTemplateUrl('templates/events-modal.html', { scope: $scope, // give ModalCtrl access to this scope animation: 'slide-in-up', - id: 'footage' + id: 'footage', + showLive:sl }) .then(function(modal) { diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 958ab3c3..970c06cf 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -340,6 +340,7 @@ "kShowAlarmedEvents" :"Show alarmed events", "kShowAllEvents" :"Show all events", "kShowAllFrames" :"all", + "kShowLiveForInProgress" :"play live feed if event recording in progress", "kShowTimeDiffFrames" :"unique times", "kShowTip" :"show tip", "kShowing" :"Showing", diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html index 5348ba9c..531ca840 100644 --- a/www/templates/devoptions.html +++ b/www/templates/devoptions.html @@ -24,6 +24,12 @@ <ion-toggle ng-model="loginData.useLocalTimeZone" ng-checked="{{loginData.useLocalTimeZone}}" ng-disabled="!isTzSupported()" toggle-class="toggle-calm"><span class="item-text-wrap">{{'kLocalTimeZone' | translate}}<span ng-if="!isTzSupported()"><p>{{'kTimeZoneNotSupported' | translate}}</p></span><span ng-if="isTzSupported()"><p>{{'kServerTimeZone' | translate}}:{{getTimeZoneNow()}}</p></span></span> </ion-toggle> </label> + + <label> + <ion-toggle ng-model="loginData.showLiveForInProgressEvents" ng-checked="{{loginData.showLiveForInProgressEvents}}" toggle-class="toggle-calm"><span class="item-text-wrap">{{'kShowLiveForInProgress' | translate}}</span> + </ion-toggle> + </label> + <div ng-if="$root.platformOS=='android'"> <label> <ion-toggle ng-model="loginData.exitOnSleep" ng-checked="{{loginData.exitOnSleep}}" toggle-class="toggle-calm"><span class="item-text-wrap">{{'kExitAppBackground' | translate}}</span></ion-toggle> |
