From f286615882223adf7bc309c75a142286b5044cc1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 30 Apr 2018 10:55:59 -0400 Subject: #618 add token for basic auth as "fyi" for all images --- www/js/TimelineModalCtrl.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'www/js/TimelineModalCtrl.js') diff --git a/www/js/TimelineModalCtrl.js b/www/js/TimelineModalCtrl.js index e7a7e2cd..d442b47d 100644 --- a/www/js/TimelineModalCtrl.js +++ b/www/js/TimelineModalCtrl.js @@ -49,6 +49,25 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' } }; + + $scope.constructFrames = function (event,alarm) { + + var stream = ""; + if (event.Event.imageMode=='path') { + stream = event.Event.baseURL + "/index.php?view=image" + + "&path="+event.Event.relativePath+alarm.fname + + "&height=380"; + } + else if (event.Event.imageMode == 'fid') { + stream = event.Event.baseURL + "/index.php?view=image" + + "&fid="+alarm.id; + + } + if ($rootScope.authSession !='undefined') stream+=$rootScope.authSession; + if ($rootScope.basicAuthToken) stream +="&basicauth="+$rootScope.basicAuthToken; + return stream; + }; + //------------------------------------------------------- // we use this to reload the connkey if authkey changed //------------------------------------------------------ -- cgit v1.2.3