diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-30 11:08:32 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-30 11:08:32 -0400 |
| commit | 3c29380ef33accd99c6ed2847539a3856619a190 (patch) | |
| tree | ebf7267f4a2a21469d7e88759d4414a2d4aea1fe | |
| parent | f286615882223adf7bc309c75a142286b5044cc1 (diff) | |
#618 basic auth token
| -rw-r--r-- | www/js/MomentCtrl.js | 13 | ||||
| -rw-r--r-- | www/templates/moment.html | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js index 4abe5c9f..06658e0e 100644 --- a/www/js/MomentCtrl.js +++ b/www/js/MomentCtrl.js @@ -257,7 +257,20 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$ }; + $scope.constructFrame = function(moment) { + var stream = ""; + stream = moment.Event.baseURL+"/index.php?view=image" + + "&fid="+moment.Event.MaxScoreFrameId+ + "&width="+moment.Event.thumbWidth*2 + + "&height="+moment.Event.thumbHeight*2; + + if ($rootScope.authSession != 'undefined') stream +=$rootScope.authSession; + if ($rootScope.basicAuthToken) stream = stream+"&basicauth="+$rootScope.basicAuthToken; + return stream; + + }; + //---------------------------------------------------------------- // construct popover only when needed // so that we can use one-time binding for the compare function diff --git a/www/templates/moment.html b/www/templates/moment.html index bb62c581..e58b0e11 100644 --- a/www/templates/moment.html +++ b/www/templates/moment.html @@ -97,7 +97,7 @@ <span style="float:right"> <button class="button button-small button-icon icon {{moment.Event.icon}}" ng-click="toggleCollapse(moment.Event.MonitorId, moment.Event.Id)"></button>{{moment.Event.collapseCount}} </span> </figcaption> - <img image-spinner-src="{{moment.Event.baseURL}}/index.php?view=image&fid={{moment.Event.MaxScoreFrameId}}&width={{moment.Event.thumbWidth*2}}&height={{moment.Event.thumbHeight*2}}" + <img image-spinner-src="{{constructFrame(moment)}}" img-spinner-w="{{moment.Event.width}}" img-spinner-h="{{moment.Event.height}}" image-spinner-loader="lines" on-tap="playEvent(moment)" on-swipe-left="showThumbnail(moment.Event.baseURL,moment.Event.MaxScoreFrameId)" /> |
