summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/EventCtrl.js4
-rw-r--r--www/js/NVR.js7
-rw-r--r--www/lang/locale-en.json1
-rw-r--r--www/templates/devoptions.html7
4 files changed, 19 insertions, 0 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js
index 5cf91eb3..a7ba3128 100644
--- a/www/js/EventCtrl.js
+++ b/www/js/EventCtrl.js
@@ -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");
diff --git a/www/js/NVR.js b/www/js/NVR.js
index 481d8512..82b7ac66 100644
--- a/www/js/NVR.js
+++ b/www/js/NVR.js
@@ -191,6 +191,7 @@ angular.module('zmApp.controllers')
'saveToCloud': true,
'montageReviewCollapse': true,
'objectDetectionFilter': false,
+ 'enableEventRefresh': true,
};
@@ -1507,6 +1508,12 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.enableEventRefresh == 'undefined') {
+
+ loginData.enableEventRefresh = true;
+
+ }
+
loginData.canSwipeMonitors = true;
loginData.forceImageModePath = false;
diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json
index 9770f145..d43def45 100644
--- a/www/lang/locale-en.json
+++ b/www/lang/locale-en.json
@@ -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",
diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html
index 3c0a12ed..aeb036d4 100644
--- a/www/templates/devoptions.html
+++ b/www/templates/devoptions.html
@@ -156,6 +156,13 @@
</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}}
</span>