From 02ad62d14f9f0b17c0dec6756fe499874d29e611 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 11 May 2018 10:25:12 -0400 Subject: formatting changes for better readability across different devices --- www/js/EventCtrl.js | 21 +++++-- www/js/WizardCtrl.js | 4 +- www/js/app.js | 2 +- www/templates/events.html | 142 +++++++++++++++++++++++----------------------- 4 files changed, 90 insertions(+), 79 deletions(-) (limited to 'www') 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 diff --git a/www/templates/events.html b/www/templates/events.html index e46fadba..a07d98a1 100644 --- a/www/templates/events.html +++ b/www/templates/events.html @@ -9,7 +9,7 @@     - +
@@ -20,7 +20,7 @@
- + @@ -38,88 +38,87 @@       {{prettifyDate(event.Event.StartTime)}}  {{tzAbbr}}  -
-
+
+
-
-
- - -
-
-
- - -
-
-
- - -
-
-
+ + +   + + + + +   + + + + +   + + + + -
- - {{event.Event.Length}}s - -
+ + + -
-
- +  {{event.Event.MonitorName}} - ({{event.Event.Id}})   - - - - - - - -
- + ({{event.Event.Id}})   +
{{event.Event.Frames}}   {{event.Event.AlarmFrames}}   - - +
+ + {{humanize(event.Event.Length)}} + +
+ -
+ -
- + + - +
- - +
+ + + +
+ + +
-
+
+
-
-
-   {{event.Event.Name}} -
-   {{prettify(event.Event.StartTime)}} {{tzAbbr}}  -
-   {{event.Event.Notes}} +
+
+   {{event.Event.Name}} +
+   {{prettify(event.Event.StartTime)}} {{tzAbbr}}  +
+   {{event.Event.Notes}} -
+
@@ -170,12 +169,11 @@ :{{alarm.frameid}}, :{{alarm.score}}, : {{prettifyTimeSec(alarm.time)}} - - + @@ -198,9 +196,9 @@
  • - - + +
@@ -213,7 +211,7 @@
+ vg-player-ready="readyToPlay($API)"> @@ -284,7 +282,7 @@
- -- cgit v1.2.3