aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2013-01-17 18:17:53 +0000
committerflop25 <flop25@piwigo.org>2013-01-17 18:17:53 +0000
commitb91d2f7772db73eb3be07cd269ebacd31c8a7b1f (patch)
treea13abeccbb066a404ea6769293965db94da2cba6 /themes/default/js
parenta8d61ee8e671bd16ea231935cf79fae79a317dd3 (diff)
bug:2684
picture page and comment_list.tpl clean up unused loader gif git-svn-id: http://piwigo.org/svn/trunk@20211 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--themes/default/js/thumbnails.loader.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/themes/default/js/thumbnails.loader.js b/themes/default/js/thumbnails.loader.js
index 9483caeb6..b383b7276 100644
--- a/themes/default/js/thumbnails.loader.js
+++ b/themes/default/js/thumbnails.loader.js
@@ -11,12 +11,17 @@ function add_thumbnail_to_queue(img, loop) {
url: img.data('src'),
data: { ajaxload: 'true' },
dataType: 'json',
+ beforeSend: function(){jQuery('.loader').show()},
success: function(result) {
img.attr('src', result.url);
+ jQuery('.loader').hide();
},
error: function() {
if (loop < 3)
add_thumbnail_to_queue(img, ++loop); // Retry 3 times
+ if ( typeof( error_icon ) != "undefined" )
+ img.attr('src', error_icon);
+ jQuery('.loader').hide();
}
});
}