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

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

fixc empty share key field after addition
fix javascript errors

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