diff --git a/package.json b/package.json index ef197b471..58ad68e08 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version":"1.3.026", + "version": "1.3.026", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", @@ -175,4 +175,4 @@ ] } } -} +} \ No newline at end of file diff --git a/www/js/DataModel.js b/www/js/DataModel.js index f1ea3689c..71062b574 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -703,13 +703,7 @@ angular.module('zmApp.controllers') // the ZM authors fix this and streamline the access of images // from APIs, I don't have an option - zmStateGo: function (state, p1, p2) { - if ($rootScope.platformOS == 'desktop') - $state.go(state, p1, p2); - else - $state.go(state, p1, p2); - // $ionicNativeTransitions.stateGo(state, p1, p2); - }, + // used when an empty server profile is created getDefaultLoginObject: function () { diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index b2bbca870..2c64ce70d 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -1813,7 +1813,7 @@ angular.module('zmApp.controllers') $http.get(apiurl) .then(function (data) { data = data.data; - NVRDataModel.debug(JSON.stringify(data)); + // NVRDataModel.debug(JSON.stringify(data)); $scope.hours = []; var p = data.results; for (var key in data.results) { @@ -1849,7 +1849,7 @@ angular.module('zmApp.controllers') $http.get(apiurl) .then(function (data) { data = data.data; - NVRDataModel.debug(JSON.stringify(data)); + //NVRDataModel.debug(JSON.stringify(data)); $scope.days = []; var p = data.results; for (var key in data.results) { @@ -1882,7 +1882,7 @@ angular.module('zmApp.controllers') $http.get(apiurl) .then(function (data) { data = data.data; - NVRDataModel.debug(JSON.stringify(data)); + // NVRDataModel.debug(JSON.stringify(data)); $scope.weeks = []; var p = data.results; for (var key in data.results) { @@ -1916,7 +1916,7 @@ angular.module('zmApp.controllers') $http.get(apiurl) .then(function (data) { data = data.data; - NVRDataModel.debug(JSON.stringify(data)); + //NVRDataModel.debug(JSON.stringify(data)); $scope.months = []; var p = data.results; for (var key in data.results) { diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 6c98c1678..7bd049a5d 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -1064,14 +1064,14 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if (currentStreamState == streamState.STOPPED || !$scope.eventId) { stream = ""; } else if (currentStreamState == streamState.SNAPSHOT) { - stream = $scope.loginData.url + + stream = currentEvent.Event.recordingURL + "/index.php?view=image" + "&fid=" + $scope.snapshotFrameId + (!isGlobalFid ? "&eid=" + $scope.eventId : "") + "&scale=" + $scope.singleImageQuality + $rootScope.authSession; } else if (currentStreamState == streamState.ACTIVE) { - stream = $scope.loginData.streamingurl + + stream = currentEvent.Event.streamingURL + "/nph-zms?source=event&mode=jpeg" + "&event=" + $scope.eventId + "&frame=1" + "&replay=" + $scope.currentStreamMode + @@ -1082,9 +1082,11 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro } //console.log ($scope.connKey ); - //console.log ("STREAM="+stream); + //console.log ("EID="+$scope.eventId); if ($rootScope.basicAuthToken && stream) stream += "&basicauth=" + $rootScope.basicAuthToken; + + //console.log ("STREAM="+stream); return stream; }; @@ -1131,6 +1133,9 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro isSnapShotEnabled = true; currentStreamState = streamState.SNAPSHOT; if (m.snapshotId) { + + $scope.snapshotFrameId = m.snapshotId; + $scope.snapshotFrameId = m.snapshotId; isGlobalFid = true; } else { @@ -1913,7 +1918,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro tempAlarms = []; $scope.FrameArray = []; - console.log ("FRAME ARRAY: "+JSON.stringify(data)); + //console.log ("FRAME ARRAY: "+JSON.stringify(data)); if (data.event && data.event.Frame) $scope.FrameArray = data.event.Frame; var ts = 0; @@ -1950,7 +1955,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro if ($rootScope.authSession != 'undefined') frame += $rootScope.authSession; frame += NVRDataModel.insertBasicAuthToken(); - // console.log (frame); + //console.log ("alarm:"+frame); return frame; }; @@ -1982,7 +1987,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro currentEvent = event; $scope.event = event; - console.log ("prepareModal DATA:"+JSON.stringify(success.data)); + // console.log ("prepareModal DATA:"+JSON.stringify(success.data)); computeAlarmFrames(success.data); $scope.eventWarning = ''; @@ -1998,7 +2003,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro event.Event.streamingURL = NVRDataModel.getStreamingURL(event.Event.MonitorId); - event.Event.recordingURL = loginData.url; + event.Event.recordingURL = NVRDataModel.getRecordingURL(event.Event.MonitorId); event.Event.imageMode = NVRDataModel.getImageMode(event.Event.MonitorId); //console.log (JSON.stringify( success)); diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 161a1025f..003e11682 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -218,13 +218,6 @@ angular.module('zmApp.controllers') "view": 'app.montage' }); - - /* $state.transitionTo($state.current, $stateParams, { - reload: true, - inherit: false, - notify: true - });*/ - }); diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index 36630a733..592e2c431 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -282,6 +282,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic broadcastHandles.push(pp); function evaluateTappedNotification() { + NVRDataModel.debug (">>>Inside evaluateNotifications"); var ld = NVRDataModel.getLogin(); diff --git a/www/js/app.js b/www/js/app.js index 4e1463845..8bbe4d1b8 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -716,7 +716,7 @@ angular.module('zmApp', [ //console.log ("HTTP response"); - if (response.data && typeof(response.data) == 'string' && response.data.indexOf("
") != -1) { + if (response.data && typeof(response.data) == 'string' && response.data.startsWith("")) { console.log ("cake error detected, attempting fix..."); response.data = JSON.parse(response.data.replace(/[\s\S]*<\/pre>/,'')); //console.log ("FIXED="+response.data); @@ -2350,7 +2350,7 @@ angular.module('zmApp', [ } else { // work around for cake-error leak - if (succ.data.indexOf("") != -1) { + if (succ.data.startsWith("") ) { logger.debug ("**** Native: cake-error in message, trying fix..."); succ.data = JSON.parse(succ.data.replace(/[\s\S]*<\/pre>/,'')); } diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 164c3f62d..ad3266a8f 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -33,14 +33,14 @@ - +-