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
This commit is contained in:
flop25
2013-01-17 18:17:53 +00:00
parent a8d61ee8e6
commit b91d2f7772
7 changed files with 12 additions and 4 deletions
+5
View File
@@ -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();
}
});
}