Last change
on this file since 23551 was
23551,
checked in by mistic100, 11 years ago
|
many corrections & optimizations + remove useless code + clean
|
File size:
960 bytes
|
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} |
---|
5 | jQuery("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 class="addCollection" data-id="'+ $(this).data('id') +'" rel="nofollow">{'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 | }); |
---|
15 | jQuery(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.