diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-11 10:25:12 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-05-11 10:25:12 -0400 |
| commit | 02ad62d14f9f0b17c0dec6756fe499874d29e611 (patch) | |
| tree | 102678bafa782d45fcb35ff22f033ef694e7bf16 /www/js | |
| parent | c840ddaf079ba64c24d1d3c9103b0ab319454fa8 (diff) | |
formatting changes for better readability across different devices
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 21 | ||||
| -rw-r--r-- | www/js/WizardCtrl.js | 4 | ||||
| -rwxr-xr-x | www/js/app.js | 2 |
3 files changed, 20 insertions, 7 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index c6427844..c4b90a47 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -887,6 +887,7 @@ angular.module('zmApp.controllers') function onSuccess(results) { + $ionicLoading.hide(); NVRDataModel.debug("Removing temp file"); if ($rootScope.platformOS == 'ios') @@ -898,7 +899,8 @@ angular.module('zmApp.controllers') function onError(error) { - //console.log("Error: " + error); + $ionicLoading.hide(); + console.log("Error: " + error); } } @@ -3180,9 +3182,10 @@ angular.module('zmApp.controllers') $scope.constructThumbnail = function(event) { var stream = ""; stream = event.Event.baseURL+ - "/index.php?view=image&fid=" +event.Event.MaxScoreFrameId + - "&width="+event.Event.thumbWidth*2 + - "&height="+event.Event.thumbHeight*2; + "/index.php?view=image&fid=" + + (event.Event.MaxScoreFrameId ? event.Event.MaxScoreFrameId: "1&eid="+event.Event.Id) + + "&width="+event.Event.thumbWidth*2 + + "&height="+event.Event.thumbHeight*2; if ($rootScope.authSession !='undefined') stream+=$rootScope.authSession; stream += NVRDataModel.insertBasicAuthToken(); @@ -3260,6 +3263,16 @@ angular.module('zmApp.controllers') } + $scope.humanize = function (num) { + + var min = Math.floor(num/60); + var sec = Math.floor(num - min * 60); + stime=""; + if (min) stime += min+"m,"; + if (sec) stime += sec+"s"; + return stime; + }; + $scope.prettifyDate = function(str) { if (NVRDataModel.getLogin().useLocalTimeZone) diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index a1fd7cb2..f285418f 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -218,9 +218,9 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ var a5 = baseUri + "/zmcgi"; // mageia var a4 = baseUri + "/cgi-bin/zm"; // another one I found with a CentOS 6 guy - var a3 = baseUri + "/zm/cgi-bin"; // ubuntu/debian + var a1 = baseUri + "/zm/cgi-bin"; // ubuntu/debian var a2 = baseUri + "/cgi-bin-zm"; //fedora/centos/rhel - var a1 = baseUri + "/cgi-bin"; // doofus + var a3 = baseUri + "/cgi-bin"; // doofus var urls = [a1, a2, a3, a4, a5]; diff --git a/www/js/app.js b/www/js/app.js index 6f9569e5..08cd18f5 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -103,7 +103,7 @@ angular.module('zmApp', [ quantSample: 15, hashSecret: 'unused at the moment', forceMontageReloadDelay: 4500000, // 1 hr 15m, - //forceMontageReloadDelay: 5000, // 1 hr 15m, + //forceMontageReloadDelay: 10000, // testing 10s thumbWidth:200, alarmStatusTime: 10000, eventServerErrorDelay:5000, // time to wait till I report initial connect errors |
