Ignore:
Timestamp:
Jan 13, 2013, 12:29:56 AM (11 years ago)
Author:
mistic100
Message:

full compatibility with Gthumb+, improve some code

Location:
extensions/UserCollections/template
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/template/menublock_user_collec.tpl

    r16698 r20097  
    33  <p>
    44    {if $block->data.NB_COL == 0}
    5       {'You have no collection'|@translate|sprintf:$block->data.NB_COL}
     5      {'You have no collection'|@translate}
    66    {else}
    77      <a href="{$block->data.U_LIST}">{$pwg->l10n_dec('You have %d collection', 'You have %d collections', $block->data.NB_COL)}</a>
     
    1010  <ul>{strip}
    1111                {foreach from=$block->data.collections item=col}
    12                 <li>{if $col.active}
    13       <a href="{$col.U_EDIT}" style="font-weight:bold;" rel="nofollow">{$col.name}</a> <i class="menuInfoCat">({'active'|@translate})</i> <span class="menuInfoCat">[<span class="nbImagesCollec">{$col.nb_images}</span>]</span>
    14     {else}
    15       <a href="{$col.U_EDIT}" rel="nofollow">{$col.name}</a> <span class="menuInfoCat">[{$col.nb_images}]</span>
    16     {/if}</li>
     12                <li>
     13      <a href="{$col.U_EDIT}" {if $col.active}style="font-weight:bold;"{/if} rel="nofollow">{$col.name}</a>&nbsp;
     14      {if $col.active}<i class="menuInfoCat">({'active'|@translate})</i>&nbsp;{/if}
     15      <span class="menuInfoCat">[<span {if $col.count_handler}class="nbImagesCollec"{/if}>{$col.nb_images}</span>]</span>
     16    </li>
    1717                {/foreach}
    1818    {if $block->data.MORE}<li class="menuInfoCat">{'%d more...'|@translate|sprintf:$block->data.MORE}</li>{/if}
  • extensions/UserCollections/template/thumbnails_css_js.tpl

    r20090 r20097  
    11{html_style}
    22.thumbnails .wrap1 {ldelim} position:relative !important; }
    3 .wrap1 .addCollection {ldelim} width:100%;height:16px;display:none;position:absolute;top:0;background:rgba(0,0,0,0.8);padding:2px;border-radius:2px;font-size:10px;z-index:100;color:#eee;white-space:nowrap; }
    4 .wrap1:hover .addCollection {ldelim} display:block; }
     3.wrap1 .addCollection, .gthumb .addCollection {ldelim} width:100%;height:16px;display:none;position:absolute;top:0;background:rgba(0,0,0,0.8);padding:2px;border-radius:2px;font-size:10px;z-index:100 !important;color:#eee;white-space:nowrap; }
     4.wrap1:hover .addCollection, .gthumb:hover .addCollection {ldelim} display:block; }
    55{/html_style}
    66
     
    1717  }).done(function(msg) {ldelim}
    1818    if (msg == "true") {ldelim}
    19       $trigger.html('{'Remove from collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_delete.png" title="{'Remove from collection'|@translate}">');
     19      $trigger.children(".uc_remove").show();
     20      $trigger.children(".uc_add").hide();
    2021      jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) +1);
    2122    } else if (msg == "false") {ldelim}
    2223    {if $COL_ID}
    23       $trigger.parent(".wrap1").hide("fast", function() {ldelim} $trigger.remove() });
     24      $trigger.parent(".wrap1, .gthumb").hide("fast", function() {ldelim} $trigger.remove() });
    2425      if (typeof batchdown_count != 'undefined') batchdown_count-=1;
    2526    {else}
    26       $trigger.html('{'Add to collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_add.png" title="{'Add to collection'|@translate}">');
     27      $trigger.children(".uc_remove").hide();
     28      $trigger.children(".uc_add").show();
    2729    {/if}
    28       jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1);
     30    jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1);
    2931    } else {ldelim}
    3032      $trigger.html('{'Un unknown error occured'|@translate}');
Note: See TracChangeset for help on using the changeset viewer.