Skip to content

Commit

Permalink
#779 add options in dev to disable
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Feb 25, 2019
1 parent 0512c05 commit e75a44b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/js/EventCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ angular.module('zmApp.controllers')

function timedPageReload() {

if (!NVR.getLogin().enableEventRefresh) {
NVR.debug ("Event refresh disabled");
return;
}

if ($ionicScrollDelegate.$getByHandle("mainScroll").getScrollPosition().top !=0 ) {
NVR.debug ("Not reloading as you have scrolled");
Expand Down
7 changes: 7 additions & 0 deletions www/js/NVR.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ angular.module('zmApp.controllers')
'saveToCloud': true,
'montageReviewCollapse': true,
'objectDetectionFilter': false,
'enableEventRefresh': true,


};
Expand Down Expand Up @@ -1507,6 +1508,12 @@ angular.module('zmApp.controllers')

}

if (typeof loginData.enableEventRefresh == 'undefined') {

loginData.enableEventRefresh = true;

}


loginData.canSwipeMonitors = true;
loginData.forceImageModePath = false;
Expand Down
1 change: 1 addition & 0 deletions www/lang/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"kEmailNotConfigured" :"Email not configured",
"kEnable24hr" :"enable 24hr time format",
"kEnableDebug" :"Enable debug logs",
"kEnableEventRefresh" :"Automatically refresh events page",
"kEnableLogs" :"Enable logs",
"kEnableSlowLoading" :"Use large HTTP timeouts",
"kEnableStrictSSL" :"Enable strict SSL check",
Expand Down
7 changes: 7 additions & 0 deletions www/templates/devoptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@
</ion-toggle>
</label>

<label>
<ion-toggle ng-model="loginData.enableEventRefresh" toggle-class="toggle-calm">
<span class="item-text-wrap">{{'kEnableEventRefresh' | translate}}
</span>
</ion-toggle>
</label>

<label>
<ion-toggle ng-model="loginData.enableSlowLoading" toggle-class="toggle-calm">
<span class="item-text-wrap">{{'kEnableSlowLoading' | translate}}
Expand Down

0 comments on commit e75a44b

Please sign in to comment.