diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-27 13:57:38 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-27 13:57:38 -0400 |
| commit | 51a65814b743ea0b16eca57288a2c2eb20f9e5ac (patch) | |
| tree | 9e2d552b1420aeefeb7fc890cceac4306cec4cda /www | |
| parent | 9625319a4b0f288b3a1e3d89664bac0810a892b1 (diff) | |
cleanup
Diffstat (limited to 'www')
| -rwxr-xr-x | www/js/DataModel.js | 10 | ||||
| -rw-r--r-- | www/js/EventCtrl.js | 28 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 8 | ||||
| -rw-r--r-- | www/js/EventServer.js | 4 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 6 | ||||
| -rw-r--r-- | www/js/PortalLoginCtrl.js | 5 | ||||
| -rw-r--r-- | www/js/RefreshCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 4 | ||||
| -rwxr-xr-x | www/js/app.js | 2 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 6 | ||||
| -rw-r--r-- | www/lang/locale-pl.json | 2 |
11 files changed, 40 insertions, 37 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 8c2ba754..a76bf2d3 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -865,14 +865,15 @@ angular.module('zmApp.controllers') var up = components.userinfo.split(':'); loginData.basicAuthPassword = up[1]; loginData.basicAuthUser = up[0]; - console.log ("SETTING "+loginData.basicAuthUser+" "+loginData.basicAuthPassword); + //console.log ("SETTING "+loginData.basicAuthUser+" "+loginData.basicAuthPassword); } if (loginData.isUseBasicAuth) { $rootScope.basicAuthHeader = 'Basic ' + btoa(loginData.basicAuthUser+':'+loginData.basicAuthPassword); + debug ("Basic authentication detected, constructing Authorization Header"); - console.log ("BASIC AUTH SET TO:"+$rootScope.basicAuthHeader); + // console.log ("BASIC AUTH SET TO:"+$rootScope.basicAuthHeader); } @@ -1703,10 +1704,11 @@ angular.module('zmApp.controllers') return $http.get(req+"&command=17") .then ( function (s) { - debug ("kill success for ck:"+ck+" with:"+JSON.stringify(s)); + // debug ("kill success for ck:"+ck+" with:"+JSON.stringify(s)); }, - function (e) {debug ("kill success for ck:"+ck+" with:"+JSON.stringify(e));} + function (e) {//debug ("kill success for ck:"+ck+" with:"+JSON.stringify(e)); + } ); }, diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 9a8bfdf2..ebdff76e 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -94,7 +94,7 @@ angular.module('zmApp.controllers') $scope.$on('$ionicView.afterEnter', function() { - console.log ("********* AFTER ENTER"); + // console.log ("********* AFTER ENTER"); // $ionicListDelegate.canSwipeItems(true); NVRDataModel.debug ("enabling options swipe"); @@ -178,7 +178,7 @@ angular.module('zmApp.controllers') $scope.id = parseInt($stateParams.id, 10); $scope.showEvent = $stateParams.playEvent || false; - console.log("BEFORE ENTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); + //console.log("BEFORE ENTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); NVRDataModel.log("EventCtrl called with: E/MID=" + $scope.id + " playEvent = " + $scope.showEvent); @@ -703,7 +703,7 @@ angular.module('zmApp.controllers') function writeFile(path, __filename, __data){ var d = $q.defer(); - console.log ("inside write file"); + //console.log ("inside write file"); window.requestFileSystem(LocalFileSystem.TEMPORARY, __data.size+5000, onFileSystemSuccess, fail); function fail(e) @@ -731,16 +731,16 @@ angular.module('zmApp.controllers') break; } - console.log('Error: ' + msg); + //console.log('Error: ' + msg); } function onFileSystemSuccess() { - console.log ("Got temporary FS"); + // console.log ("Got temporary FS"); window.resolveLocalFileSystemURL(path, function(dir){ dir.getFile(__filename, {create:true}, function(file){ file.createWriter(function(fileWriter){ //var blob = new Blob([__data], {type:'text/plain'}); - console.log ("about to write "+__data.size+" bytes"); + // console.log ("about to write "+__data.size+" bytes"); //var blob = new Blob([__data], {type:'text/plain'}); fileWriter.write(__data); fileWriter.onwrite = function(e) { @@ -798,7 +798,7 @@ angular.module('zmApp.controllers') function onError(error) { - console.log("Error: " + error); + // console.log("Error: " + error); } } @@ -880,7 +880,7 @@ angular.module('zmApp.controllers') function onError(error) { - console.log("Error: " + error); + //console.log("Error: " + error); } } @@ -1314,7 +1314,7 @@ angular.module('zmApp.controllers') else { - console.log("in perms"); + //console.log("in perms"); cordova.plugins.photoLibrary.getLibrary( function(library) { @@ -1476,7 +1476,7 @@ angular.module('zmApp.controllers') noBackdrop: true }); - console.log("URL=" + frame); + // console.log("URL=" + frame); URL.revokeObjectURL(img.src); ctx.drawImage(img, 0, 0); @@ -1592,14 +1592,14 @@ angular.module('zmApp.controllers') writeFile2(tp,"temp-file.gif",blob,false) .then (function (succ) { NVRDataModel.debug ("write to file successful"); - console.log( "write file successful"); + // console.log( "write file successful"); $ionicLoading.hide(); var ntp = tp; //ntp = tp.indexOf('file://') === 0 ? tp.slice(7) : tp; ntp = ntp+"temp-file.gif"; - console.log ("ntp="+ntp); + // console.log ("ntp="+ntp); moveImageToGallery(ntp); $rootScope.isDownloading = false; @@ -1643,7 +1643,7 @@ angular.module('zmApp.controllers') .then(function(imgs) { - console.log("TOTAL IMAGES TO GIF=" + imgs.length); + // console.log("TOTAL IMAGES TO GIF=" + imgs.length); //console.log(JSON.stringify(imgs)); var ad = adjustAspect(e); @@ -2462,7 +2462,7 @@ angular.module('zmApp.controllers') else videoURL = event.Event.baseURL + "/index.php?view=view_video&eid=" + event.Event.Id; - console.log("************** VIDEO IS " + videoURL); + // console.log("************** VIDEO IS " + videoURL); event.Event.video.config = { autoPlay: true, sources: [ diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index edcbb5f6..6d4444a2 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1132,7 +1132,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } $scope.modalImageLoaded = function() { - console.log ("MODAL IMAGE LOADED"); + // console.log ("MODAL IMAGE LOADED"); // if (m.snapshot != 'enabled') currentStreamState = streamState.ACTIVE; }; @@ -1553,11 +1553,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVRDataModel.debug ("Asking nearest video EID using "+url); $http.get(url) .then ( function (succ) { - console.log ("GOT "+JSON.stringify(succ)); + // console.log ("GOT "+JSON.stringify(succ)); }, function (err) { - console.log ("ERR GOT "+JSON.stringify(succ)); + // console.log ("ERR GOT "+JSON.stringify(succ)); } ); } @@ -1803,7 +1803,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.mName = NVRDataModel.getMonitorName(event.Event.MonitorId); //console.log (">>>>>>>>HUMANIZE " + $scope.humanizeTime); - console.log("**** VIDEO STATE IS " + event.Event.DefaultVideo); + // console.log("**** VIDEO STATE IS " + event.Event.DefaultVideo); if (typeof event.Event.DefaultVideo === 'undefined' || event.Event.DefaultVideo == '') { event.Event.DefaultVideo = ""; } diff --git a/www/js/EventServer.js b/www/js/EventServer.js index ab2a0c27..e4bf4c92 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -113,7 +113,7 @@ angular.module('zmApp.controllers') //if (!$rootScope.apnsToken) if (!pushInited) pushInit(); - console.log ("WS TYPEOF="+ typeof ws); + // console.log ("WS TYPEOF="+ typeof ws); // console.log ("WS="+JSON.stringify(ws)); if (typeof ws !== 'undefined') { @@ -361,7 +361,7 @@ angular.module('zmApp.controllers') return; } - console.log (">>>>>>>>>>>>>>>>>EVENT SERVER SENDING: type="+type+" DATA="+JSON.stringify(obj)); + // console.log (">>>>>>>>>>>>>>>>>EVENT SERVER SENDING: type="+type+" DATA="+JSON.stringify(obj)); ws.send({ 'event':type, 'data': obj diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 4d0f24bd..40497af7 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -369,7 +369,7 @@ angular.module('zmApp.controllers') //NVRDataModel.log("Force calling resize"); ///pckry.reloadItems(); ///positions is defined only if layouttype was false - console.log(">>> Positions is " + JSON.stringify(positions)); + //(">>> Positions is " + JSON.stringify(positions)); if (!layouttype && positions) pckry.initShiftLayout(positions, "data-item-id"); // now do a jiggle $timeout(function () { @@ -1751,9 +1751,7 @@ angular.module('zmApp.controllers') $scope.monitors = NVRDataModel.getMonitorsNow(); $scope.MontageMonitors = angular.copy($scope.monitors); - for (var ck = 0; ck < $scope.MontageMonitors.length; ck++) { - console.log("Monitor: " + $scope.MontageMonitors[ck].Monitor.Name + " Connkey:" + $scope.MontageMonitors[ck].Monitor.connKey); - } + $scope.singleMonitorModalOpen = false; // $scope.minimal = $stateParams.minimal; diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index ef02c99a..aa5e9d86 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -238,6 +238,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic NVRDataModel.hrsSinceChecked("zmVersion") .then (function (val) { + NVRDataModel.debug ("ZM Version nag: Checking "+val+" with "+zm.zmVersionCheckNag); if (val >=zm.zmVersionCheckNag) { NVRDataModel.updateHrsSinceChecked("zmVersion"); $state.go('app.importantmessage', @@ -460,7 +461,9 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic NVRDataModel.hrsSinceChecked("zmVersion") .then (function (val) { - if (val >=24) { + + NVRDataModel.debug ("ZM Version nag: Checking "+val+" with "+zm.zmVersionCheckNag); + if (val >=zm.zmVersionCheckNag ) { NVRDataModel.updateHrsSinceChecked("zmVersion"); $state.go('app.importantmessage', { diff --git a/www/js/RefreshCtrl.js b/www/js/RefreshCtrl.js index 43ef9ac6..a29aae96 100644 --- a/www/js/RefreshCtrl.js +++ b/www/js/RefreshCtrl.js @@ -16,7 +16,7 @@ angular.module('zmApp.controllers').controller('zmApp.RefreshCtrl', ['$scope', ' { //console.log("**VIEW ** LowVersion Ctrl Entered"); $ionicSideMenuDelegate.canDragContent(false); - console.log ("jumping to: "+$stateParams.view); + //console.log ("jumping to: "+$stateParams.view); $ionicHistory.nextViewOptions({ disableAnimate: true, disableBack: true diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index d689ec4f..633fe454 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -1028,7 +1028,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla function drawGraph(fromDate, toDate, count) { - console.log("INSIDE DRAW"); + // console.log("INSIDE DRAW"); $scope.newEvents = ""; // we only need this for day mode @@ -1289,7 +1289,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla } } - console.log(">>>>> CREATING NEW TIMELINE with " + JSON.stringify(options)); + // console.log(">>>>> CREATING NEW TIMELINE with " + JSON.stringify(options)); timeline = new vis.Timeline(container[0], null, options); // console.log ("GRAPH DATA"); timeline.setItems(graphData); diff --git a/www/js/app.js b/www/js/app.js index 1258464f..5fabe820 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1745,7 +1745,7 @@ angular.module('zmApp', [ .then(function (succ) { //console.log ("FOUND STATE" + JSON.stringify(succ) + ":"+succ); if (succ) { - if ( succ.name == 'app.invalidapi' || succ.name == 'app.refresh') { + if ( succ.name == 'app.invalidapi' || succ.name == 'app.refresh' || succ.name == 'app.importantmessage') { succ.name = 'app.montage'; } $rootScope.lastState = succ.name; diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 4cb432a3..eb9a7c50 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -106,8 +106,8 @@ "kEventNotificationUrl" :"event notification url", "kEventRecording" :"Event Recording", "kEventServer" :"Event Server", - "kEventServerConnErr" :"Event Server connection error", "kEventServerConfig1" :"Please make sure your ZM settings are configured and saved before you configure the event server", + "kEventServerConnErr" :"Event Server connection error", "kEventServerNotLoggedIn" :"You are not yet logged in. Please make sure you have logged in successfully (save your login data, and ensure login is successful)", "kEventServerVersionBody1" :"You are running version", "kEventServerVersionBody2" :"Please upgrade to", @@ -276,7 +276,7 @@ "kPlaceHolderBasicAuthUser" :"basic auth user name", "kPlaceHolderZMAuthPass" :"zm auth password", "kPlaceHolderZMAuthUser" :"zm auth user name", - "kPlay" : "Play", + "kPlay" :"Play", "kPlaybackInterval" :"playback interval", "kPleaseAuthenticate" :"Please Authenticate", "kPleaseCheckCredentials" :"Please check your credentials", @@ -388,11 +388,11 @@ "kUnflag" :"Unflag", "kUnknown" :"(unknown)", "kUpdateTimeline" :"dynamic updates", + "kUseBasicAuth" :"use basic authentication", "kUseEventServer" :"Use event server", "kUseSSL" :"Use SSL", "kUseVideoControls" :"Please use video player controls for H264 events. ZoneMinder doesn't yet support zms controls", "kUseZmAuth" :"use ZM authentication", - "kUseBasicAuth" : "use basic authentication", "kUserName" :"user name", "kValidNameBasicAuth" :"Please enter a valid username and password for basic auth", "kValidNameZMAuth" :"Please enter a valid username and password for ZM auth", diff --git a/www/lang/locale-pl.json b/www/lang/locale-pl.json index bbdad7a9..72ccd38d 100644 --- a/www/lang/locale-pl.json +++ b/www/lang/locale-pl.json @@ -388,11 +388,11 @@ "kUnflag" :"Odflaguj", "kUnknown" :"(nieznany)", "kUpdateTimeline" :"aktualizacja dynamiczna", + "kUseBasicAuth" :"użyj prostego uwierzytelniania", "kUseEventServer" :"Użyj serwera Zdarzeń", "kUseSSL" :"Użyj SSL", "kUseVideoControls" :"Użyj przełączników wideo odtwarzacza dla Zdarzeń H264. ZoneMinder jeszcze nie wspiera przełączników zms", "kUseZmAuth" :"Użyj uwierzytelniania ZM", - "kUseBasicAuth" :"użyj prostego uwierzytelniania", "kUserName" :"nazwa użytkownika", "kValidNameBasicAuth" :"Wprowadź właściwego użytkownika i hasło dla prostego uwierzytelniania", "kValidNameZMAuth" :"Wprowadź właściwego użytkownika i hasło dla uwierzytelniania ZM", |
