Appearance: Remove fadeIn animation
Remove the fade in animation in document thumbnails. Tweak the match height refresh interval to reduce scrollbar jitter in Firefox. Change the fancybox display animation from zoom to fade in. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -11,19 +11,19 @@ class MayanImage {
|
||||
this.options.templateInvalidDocument = this.options.templateInvalidDocument || '<span>Error loading document image</span>';
|
||||
|
||||
$().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);
|
||||
|
||||
Reference in New Issue
Block a user