From b91d2f7772db73eb3be07cd269ebacd31c8a7b1f Mon Sep 17 00:00:00 2001 From: flop25 Date: Thu, 17 Jan 2013 18:17:53 +0000 Subject: 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 --- themes/Sylvia/icon/errors_small.png | Bin 0 -> 1270 bytes themes/Sylvia/icon/img_small.png | Bin 0 -> 1164 bytes themes/Sylvia/images/ajax_loader.gif | Bin 0 -> 10819 bytes themes/default/images/ajax-loader-big.gif | Bin 7429 -> 0 bytes themes/default/js/thumbnails.loader.js | 5 +++++ themes/default/template/comment_list.tpl | 8 +++++--- themes/default/template/picture_content.tpl | 3 ++- 7 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 themes/Sylvia/icon/errors_small.png create mode 100644 themes/Sylvia/icon/img_small.png create mode 100644 themes/Sylvia/images/ajax_loader.gif delete mode 100644 themes/default/images/ajax-loader-big.gif (limited to 'themes') diff --git a/themes/Sylvia/icon/errors_small.png b/themes/Sylvia/icon/errors_small.png new file mode 100644 index 000000000..724cc659c Binary files /dev/null and b/themes/Sylvia/icon/errors_small.png differ diff --git a/themes/Sylvia/icon/img_small.png b/themes/Sylvia/icon/img_small.png new file mode 100644 index 000000000..dbfcc9a00 Binary files /dev/null and b/themes/Sylvia/icon/img_small.png differ diff --git a/themes/Sylvia/images/ajax_loader.gif b/themes/Sylvia/images/ajax_loader.gif new file mode 100644 index 000000000..d84f65378 Binary files /dev/null and b/themes/Sylvia/images/ajax_loader.gif differ diff --git a/themes/default/images/ajax-loader-big.gif b/themes/default/images/ajax-loader-big.gif deleted file mode 100644 index cae8630d3..000000000 Binary files a/themes/default/images/ajax-loader-big.gif and /dev/null differ 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(); } }); } diff --git a/themes/default/template/comment_list.tpl b/themes/default/template/comment_list.tpl index df60a453a..f70a1a075 100644 --- a/themes/default/template/comment_list.tpl +++ b/themes/default/template/comment_list.tpl @@ -9,6 +9,8 @@ } {/html_style}{/strip} {/if} +{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script} +