summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2017-12-15 14:22:57 -0500
committerPliable Pixels <pliablepixels@gmail.com>2017-12-15 14:22:57 -0500
commitf4c6ca2e3d1bc5f986d4a6907d06d3ea20e8c701 (patch)
treebe3b51d8090a37c2a973de6d8176b6cae261e805 /www/js/app.js
parent778d33929e90b9c454e3ee76e561bb40be66378c (diff)
#467 - initial support to launch external URLs to view specific event (and fixes for monitor)
Diffstat (limited to 'www/js/app.js')
-rwxr-xr-xwww/js/app.js10
1 files changed, 6 insertions, 4 deletions
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://<mid> 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"));
}