diff options
| author | lucas_nz <lucas_nz@outlook.com> | 2020-09-05 11:42:53 +1200 |
|---|---|---|
| committer | lucas_nz <lucas_nz@outlook.com> | 2020-09-05 11:42:53 +1200 |
| commit | 956e88ec354019b9f7c68e0cd7f2fefd9921dfdc (patch) | |
| tree | 22eced6c77d8b043a4101e8e92b86f2d2dc14db9 /www | |
| parent | 49235f845d1b4cb01d64c5a650e4a0094562cf1d (diff) | |
indent for readability
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/EventDateTimeFilterCtrl.js | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index 689b800d..2de8dd15 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -103,41 +103,41 @@ angular.module('zmApp.controllers') $scope.saveFilters = function () { // only reset date/time if at least one of them is set. if ($rootScope.fromDate || $rootScope.toDate || $rootScope.fromTime || $rootScope.toTime) { - if (!$rootScope.fromDate) { - //console.log("RESET fromDate"); - $rootScope.fromDate = new Date(); - NVR.debug("DateTimeFilter: resetting from date"); - } + if (!$rootScope.fromDate) { + //console.log("RESET fromDate"); + $rootScope.fromDate = new Date(); + NVR.debug("DateTimeFilter: resetting from date"); + } - if (!$rootScope.toDate) { - // console.log("RESET toDate"); - $rootScope.toDate = new Date(); - NVR.debug("DateTimeFilter: resetting to date"); - } + if (!$rootScope.toDate) { + // console.log("RESET toDate"); + $rootScope.toDate = new Date(); + NVR.debug("DateTimeFilter: resetting to date"); + } - if (!$rootScope.fromTime) { - // console.log("RESET fromTime"); - $rootScope.fromTime = new Date(99, 5, 24, 0, 0, 0, 0); //moment().format("hh:mm:ss"); - NVR.debug("DateTimeFilter: resetting from time"); - } + if (!$rootScope.fromTime) { + // console.log("RESET fromTime"); + $rootScope.fromTime = new Date(99, 5, 24, 0, 0, 0, 0); //moment().format("hh:mm:ss"); + NVR.debug("DateTimeFilter: resetting from time"); + } - if (!$rootScope.toTime) { - //console.log("RESET toTime"); - $rootScope.toTime = new Date(99, 5, 24, 23, 59, 59, 0); - //$rootScope.toTime = "01:01:02"; //moment().format("hh:mm:ss"); - NVR.debug("DateTimeFilter: resetting to time"); - } + if (!$rootScope.toTime) { + //console.log("RESET toTime"); + $rootScope.toTime = new Date(99, 5, 24, 23, 59, 59, 0); + //$rootScope.toTime = "01:01:02"; //moment().format("hh:mm:ss"); + NVR.debug("DateTimeFilter: resetting to time"); + } - if ($rootScope.fromDate > $rootScope.toDate) { - NVR.log("From date > To Date, swapping"); - var t = $rootScope.fromDate; - $rootScope.fromDate = $rootScope.toDate; - $rootScope.toDate = t; - } - - $rootScope.fromString = moment($rootScope.fromDate).format("YYYY-MM-DD") + " " + moment($rootScope.fromTime).format("HH:mm:ss"); + if ($rootScope.fromDate > $rootScope.toDate) { + NVR.log("From date > To Date, swapping"); + var t = $rootScope.fromDate; + $rootScope.fromDate = $rootScope.toDate; + $rootScope.toDate = t; + } + + $rootScope.fromString = moment($rootScope.fromDate).format("YYYY-MM-DD") + " " + moment($rootScope.fromTime).format("HH:mm:ss"); - $rootScope.toString = moment($rootScope.toDate).format("YYYY-MM-DD") + " " + moment($rootScope.toTime).format("HH:mm:ss"); + $rootScope.toString = moment($rootScope.toDate).format("YYYY-MM-DD") + " " + moment($rootScope.toTime).format("HH:mm:ss"); } else { $rootScope.fromDate = null; |
