Changeset 20211


Ignore:
Timestamp:
Jan 17, 2013, 7:17:53 PM (11 years ago)
Author:
flop25
Message:

bug:2684
picture page and comment_list.tpl
clean up unused loader gif

Location:
trunk/themes
Files:
3 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/thumbnails.loader.js

    r13452 r20211  
    1212    data: { ajaxload: 'true' },
    1313    dataType: 'json',
     14    beforeSend: function(){jQuery('.loader').show()},
    1415    success: function(result) {
    1516      img.attr('src', result.url);
     17      jQuery('.loader').hide();
    1618    },
    1719    error: function() {
    1820      if (loop < 3)
    1921        add_thumbnail_to_queue(img, ++loop); // Retry 3 times
     22      if ( typeof( error_icon ) != "undefined" )
     23        img.attr('src', error_icon);
     24      jQuery('.loader').hide();
    2025    }
    2126  });
  • trunk/themes/default/template/comment_list.tpl

    r18995 r20211  
    1010{/html_style}{/strip}
    1111{/if}
     12{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script}
     13<div class="loader" style="display: none; position: fixed; right: 0;bottom: 0;"><img src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif"></div>
    1214<ul class="commentsList">
    1315{foreach from=$comments item=comment name=comment_loop}
     
    2123        {if !$derivative->is_cached()}
    2224        {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
    23         {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
    24         {/if}
     25  {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
     26  {/if}
    2527        <div class="illustration">
    2628                <a href="{$comment.U_PICTURE}">
    27                 <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax-loader-small.gif" data-src="{$derivative->get_url()}"{/if} alt="{$comment.ALT}">
     29                <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.icon_dir}/img_small.png" data-src="{$derivative->get_url()}"{/if} alt="{$comment.ALT}">
    2830                </a>
    2931        </div>
  • trunk/themes/default/template/picture_content.tpl

    r16522 r20211  
    22{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
    33{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
     4{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script}
    45{/if}
    56
    6 <img {if $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} {else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax-loader-big.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}{/if}">
     7<img {if $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()} {else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}{/if}">
    78
    89{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
Note: See TracChangeset for help on using the changeset viewer.