diff --git a/mayan/apps/appearance/static/appearance/js/mayan_image.js b/mayan/apps/appearance/static/appearance/js/mayan_image.js index 63b26fc0c0..4c00eb5d44 100644 --- a/mayan/apps/appearance/static/appearance/js/mayan_image.js +++ b/mayan/apps/appearance/static/appearance/js/mayan_image.js @@ -11,19 +11,19 @@ class MayanImage { this.options.templateInvalidDocument = this.options.templateInvalidDocument || 'Error loading document image'; $().fancybox({ - animationDuration : 300, - buttons : [ - 'fullScreen', - 'close', - ], - selector: 'a.fancybox', afterShow: function (instance, current) { $('a.a-caption').on('click', function(event) { instance.close(true); }); }, + animationEffect: 'fade', + animationDuration: 100, + buttons : [ + 'fullScreen', + 'close', + ], infobar: true, - + selector: 'a.fancybox', }); $('img.lazy-load').lazyload({ @@ -43,16 +43,16 @@ class MayanImage { $('.lazy-load').one('load', function() { $(this).hide(); - $(this).fadeIn(200); + $(this).show(); $(this).siblings('.spinner-container').remove(); $(this).removeClass('lazy-load pull-left'); clearTimeout(MayanImage.timer); - MayanImage.timer = setTimeout(MayanImage.timerFunction, 100); + MayanImage.timer = setTimeout(MayanImage.timerFunction, 250); }); $('.lazy-load-carousel').one('load', function() { $(this).hide(); - $(this).fadeIn(200); + $(this).show(); $(this).siblings('.spinner-container').remove(); $(this).removeClass('lazy-load-carousel pull-left'); }); @@ -73,14 +73,16 @@ class MayanImage { this.element.attr('src', dataURL); setTimeout(function () { self.element.on('error', function () { - // Check the .complete property to see if it is a real error - // or it was a cached image + // Check the .complete property to see if it is a real + // error or it was a cached image if (this.complete === false) { - // It is a cached image, set the src attribute to trigger - // it's display. + // It is a cached image, set the src attribute to + // trigger it's display. this.src = dataURL; } else { - container.html(MayanImage.options.templateInvalidDocument); + container.html( + MayanImage.options.templateInvalidDocument + ); } }); }, 1);