summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-05-15 16:41:13 -0400
committerPliable Pixels <pliablepixels@gmail.com>2019-05-15 16:41:13 -0400
commitdffe5d2c0b7969a0ce5f7af4a3719b43c0d1320f (patch)
treed56254e833b73754e3af92096a6a8cf5d860d91b /www
parent55a3ff179df5df63b4d94f33622ff934416844d6 (diff)
#817 don't update image if authSession is being negotiated
Diffstat (limited to 'www')
-rwxr-xr-xwww/js/app.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/www/js/app.js b/www/js/app.js
index 9df47f23..303467be 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -491,8 +491,8 @@ angular.module('zmApp', [
// This directive is adapted from https://github.com/paveisistemas/ionic-image-lazy-load
// I've removed lazyLoad and only made it show a spinner when an image is loading
//--------------------------------------------------------------------------------------------
- .directive('imageSpinnerSrc', ['$document', '$compile', 'imageLoadingDataShare', '$timeout', '$parse',
- function ($document, $compile, imageLoadingDataShare, $timeout, $parse) {
+ .directive('imageSpinnerSrc', ['$document', '$compile', 'imageLoadingDataShare', '$timeout', '$parse', 'NVR', '$rootScope',
+ function ($document, $compile, imageLoadingDataShare, $timeout, $parse, NVR, $rootScope) {
return {
restrict: 'A',
scope: {
@@ -618,7 +618,15 @@ angular.module('zmApp', [
bgImg.src = $attributes.imageSpinnerSrc;
} else {
- $element[0].src = $attributes.imageSpinnerSrc; // set src attribute on element (it will load image)
+
+ var ld = NVR.getLogin();
+ if (ld.isUseAuth && $rootScope.authSession=='' ) {
+ NVR.log ("waiting for authSession to have a value...");
+
+ } else {
+ $element[0].src = $attributes.imageSpinnerSrc; // set src
+ }
+
}
}