From f4c6ca2e3d1bc5f986d4a6907d06d3ea20e8c701 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 15 Dec 2017 14:22:57 -0500 Subject: #467 - initial support to launch external URLs to view specific event (and fixes for monitor) --- www/js/app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 892fc3d3..018d020a 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1244,6 +1244,7 @@ angular.module('zmApp', [ $rootScope.apnsToken = ''; $rootScope.tappedNotification = 0; $rootScope.tappedMid = 0; + $rootScope.tappedEid = 0; //var eventsToDisplay=[]; $rootScope.alarmCount = "0"; @@ -1462,17 +1463,18 @@ angular.module('zmApp', [ // handles URL launches - // if you just launch zmninja:// then it will honor the settings in "tap screen" -> events or montage - // if you launch with zmninja:// it will take you to live view for that mid + window.handleOpenURL = function (url) { - $rootScope.tappedNotification = 1; + $rootScope.tappedNotification = 2; // 1 is push $rootScope.tappedMid = 0; var c = URI.parse(url); //NVRDataModel.log ("***********launched with "+ JSON.stringify(c)); if (c.query) { var qm = getQueryVariable(c.query, "mid"); + var qe = getQueryVariable(c.query, "eid"); + if (qe) $rootScope.tappedEid = parseInt(qe); if (qm) $rootScope.tappedMid = parseInt(qm); - NVRDataModel.log("external URL called with MID=" + $rootScope.tappedMid); + NVRDataModel.log("external URL called with MID=" + $rootScope.tappedMid + " and/or EID="+$rootScope.tappedEid); //console.log (">>>>>>>>> EID="+getQueryVariable(c.query, "eid")); } -- cgit v1.2.3