diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 23 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 1 | ||||
| -rw-r--r-- | www/templates/devoptions.html | 9 |
3 files changed, 30 insertions, 3 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index d1185a8c..e2e26c00 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -365,8 +365,22 @@ angular.module('zmApp.controllers') function findNext (key,obj) { + console.log (" key is: "+ key); + console.log ("array is " + JSON.stringify (obj)); var keys = Object.keys(obj); - return keys[(keys.indexOf(key) + 1) % keys.length]; + + var len = keys.length; + var curindex = keys.indexOf(key); + var modulus = (curindex + 1) % len; + + console.log ("*********** len="+len+" curr="+curindex+" next="+modulus); + + //console.log ("Keys array "+ JSON.stringify(keys)); + + //console.log ("Current index: "+ keys.indexOf(key) ); + //console.log ("returning index of " + (keys.indexOf(key) + 1) % (keys.length)); + // console.log ("keys length is "+ keys.length); + return keys[modulus]; /* var size = Object.keys(obj).length; var i; @@ -503,7 +517,7 @@ angular.module('zmApp.controllers') function randEachTime() { $scope.randToAvoidCacheMem = new Date().getTime(); //$scope.randToAvoidCacheMem = "1"; - console.log ("Generating:"+$scope.randToAvoidCacheMem); + //console.log ("Generating:"+$scope.randToAvoidCacheMem); } //----------------------------------------------------------------------- @@ -514,7 +528,7 @@ angular.module('zmApp.controllers') { randEachTime(); - console.log ($scope.randToAvoidCacheMem); + //console.log ($scope.randToAvoidCacheMem); if ($scope.areImagesLoading) { @@ -612,6 +626,8 @@ angular.module('zmApp.controllers') ld.cycleMontageProfiles = !ld.cycleMontageProfiles; NVRDataModel.setLogin(ld); NVRDataModel.debug ("cycle="+ld.cycleMontageProfiles); + NVRDataModel.debug ("cycle interval="+ld.cycleMontageInterval); + }; @@ -1607,6 +1623,7 @@ angular.module('zmApp.controllers') // console.log ("Refreshing Image..."); }.bind(this), refreshSec * 1000); + NVRDataModel.debug ("Setting up cycle interval of:"+ NVRDataModel.getLogin().cycleMontageInterval* 1000); intervalHandleMontageCycle = $interval(function() { cycleMontageProfiles(); diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 44481f5c..ffc5c5de 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -48,6 +48,7 @@ "kCustomRange" :"Custom Range", "kCycleMonitors" :"cycle monitors", "kCycleMonitorsInterval" :"monitor cycle interval", + "kCycleMontageInterval" :"montage cycle interval", "kDay" :"Day", "kDecreaseSize" :"decrease size", "kDelete" :"Delete", diff --git a/www/templates/devoptions.html b/www/templates/devoptions.html index bc950d81..db1f8887 100644 --- a/www/templates/devoptions.html +++ b/www/templates/devoptions.html @@ -148,6 +148,15 @@ <input type="tel" placeholder="" ng-model="loginData.cycleMonitorsInterval"> </label> </div> + + <div class="item item-text-wrap item-input-inset"> + {{'kCycleMontageInterval'|translate}}({{'kSec'|translate}}.) + <label class="item-input-wrapper"> + <input type="tel" placeholder="" ng-model="loginData.cycleMontageInterval"> + </label> + </div> + + <label> <ion-toggle ng-if="loginData.enableLogs" ng-model="loginData.enableDebug" ng-checked="{{loginData.enableDebug}}" toggle-class="toggle-calm"><span class="item-text-wrap">{{'kEnableDebug' | translate}}</span></ion-toggle> </label> |
