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

Last change on this file since 20384 was 20097, checked in by mistic100, 11 years ago

full compatibility with Gthumb+, improve some code

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 path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
3
4{footer_script}
5jQuery("a.preview-box").colorbox({ldelim}
6  rel: ".preview-box",
7  href: function() {ldelim} return $(this).data('src'); },
8  title: function() {ldelim}
9    var title = $(this).children("img.thumbnail").attr("alt");
10    {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}
11    title+= ' · <a href="'+ $(this).attr('href') +'" target="_blank">{'jump to photo'|@translate} →</a>';
12    return  title;
13  }
14});
15jQuery(document).on("click", "#cboxTitle .addCollection", function() {ldelim}
16  jQuery.colorbox.close();
17  jQuery("#thumbnails a.addCollection[data-id='"+ $(this).data('id')+"']").trigger("click");
18  return false;
19});
20{/footer_script}
Note: See TracBrowser for help on using the repository browser.