Ignore:
Timestamp:
Jul 13, 2012, 12:09:19 PM (12 years ago)
Author:
mistic100
Message:

-rework the main menu
-bug when a collection is create through AJAX
-add "Remove from collection" on colorbox
-minor interfaces changes

File:
1 edited

Legend:

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

    r16658 r16688  
    55  rel: ".preview-box",
    66  title: function() {ldelim}
    7     return $(this).attr("title") +' · <a href="'+ $(this).data('url') +'" target="_blank">{'jump to photo'|@translate} →</a>';
     7    var title = $(this).attr("title");
     8    {if $F_ACTION} title+= ' · <a href="{$collection_toggle_url}&amp;collection_toggle='+ $(this).data('id') +'" class="addCollection" data-id="'+ $(this).data('id') +'">{'Remove from collection'|@translate}</a>';{/if}
     9    title+= ' · <a href="'+ $(this).data('url') +'" target="_blank">{'jump to photo'|@translate} →</a>';
     10    return  title;
    811  }
     12});
     13jQuery(document).on("click", "#cboxTitle .addCollection", function() {ldelim}
     14  jQuery.colorbox.close();
     15  jQuery("#thumbnails a.addCollection[data-id='"+ $(this).data('id')+"']").trigger("click");
     16  return false;
    917});
    1018{/footer_script}
     
    4250        <span class="wrap1">
    4351                <span class="wrap2">
    44                 <a href="{$thumbnail.FILE_SRC}" class="preview-box" title="{$thumbnail.NAME}" data-url="{$thumbnail.URL}">
     52                <a href="{$thumbnail.FILE_SRC}" class="preview-box" title="{$thumbnail.NAME}" data-url="{$thumbnail.URL}" data-id="{$thumbnail.id}">
    4553                        <img class="thumbnail" {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="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
    4654                </a>
Note: See TracChangeset for help on using the changeset viewer.