source: extensions/UserCollections/template/thumbnails_colorbox.tpl @ 25678

Last change on this file since 25678 was 25678, checked in by mistic100, 10 years ago

very big update for Piwigo 2.6

File size: 1.0 KB
Line 
1{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
2{combine_css id='colorbox' path='themes/default/js/plugins/colorbox/style2/colorbox.css'}
3
4{footer_script require='jquery'}
5jQuery('a.preview-box').colorbox({
6  rel: '.preview-box',
7  href: function() {
8    return jQuery(this).data('src');
9  },
10  title: function() {
11    var title = jQuery(this).children('img.thumbnail').attr("alt");
12    {if $F_ACTION} title+= ' · <a class="addCollection" data-id="'+ jQuery(this).data('id') +'" rel="nofollow">{'Remove from collection'|translate|escape:javascript}</a>';{/if}
13    title+= ' · <a href="'+ jQuery(this).attr('href') +'" target="_blank">{'jump to photo'|translate|escape:javascript} →</a>';
14    return  title;
15  }
16});
17jQuery(document).on('click', '#cboxTitle .addCollection', function() {
18  jQuery.colorbox.close();
19  jQuery('#thumbnails a.addCollection[data-id="'+ jQuery(this).data('id') +'"]').trigger('click');
20  return false;
21});
22{/footer_script}
Note: See TracBrowser for help on using the repository browser.