Line | |
---|
1 | {combine_script id='jquery.imgpreview' load='header' require='jquery' path='plugins/imgpreview/js/imgpreview.js'} |
---|
2 | |
---|
3 | {footer_script require='jquery.imgpreview'} |
---|
4 | {if isset($imgpreview)} |
---|
5 | {literal} |
---|
6 | jQuery('.thumbnails a, #thumbnails a').imgPreview({ |
---|
7 | containerID: 'tooltip', |
---|
8 | srcAttr: 'imgsrc', |
---|
9 | considerBorders:'true', |
---|
10 | {/literal}{if $imgpreview.preloadImages=="true"}preloadImages: true,{/if}{literal} |
---|
11 | // When container is shown: |
---|
12 | onShow: function(link){ |
---|
13 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
14 | jQuery('<span>' + jQuery(link).attr("data-tittle") + '</span>').appendTo(this); |
---|
15 | |
---|
16 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
17 | jQuery(link).stop().animate({opacity:0.4}); |
---|
18 | // Reset image: |
---|
19 | jQuery('img', this).stop().css({opacity:0}); |
---|
20 | {/literal}{/if}{literal} |
---|
21 | }, |
---|
22 | onLoad: function(){ |
---|
23 | {/literal}{if $imgpreview.opacity=="true"}{literal} |
---|
24 | jQuery(this).animate({opacity:1}, 300); |
---|
25 | {/literal}{/if}{literal} |
---|
26 | }, |
---|
27 | // When container hides: |
---|
28 | onHide: function(link){ |
---|
29 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
30 | jQuery('span', this).remove(); |
---|
31 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
32 | jQuery(link).stop().animate({opacity:1}); |
---|
33 | {/literal}{/if}{literal} |
---|
34 | } |
---|
35 | }); |
---|
36 | |
---|
37 | {/literal} |
---|
38 | {/if} |
---|
39 | {/footer_script} |
---|
40 | |
---|
41 | {combine_css path="plugins/imgpreview/css/imgpreview.css"} |
---|
42 | {if isset($imgpreview)} |
---|
43 | {html_head} |
---|
44 | {literal} |
---|
45 | <style> |
---|
46 | #tooltip img { |
---|
47 | {/literal} |
---|
48 | max-height: {$imgpreview.height}px; |
---|
49 | max-width: {$imgpreview.width}px; |
---|
50 | {literal} |
---|
51 | } |
---|
52 | </style> |
---|
53 | {/literal}{/html_head} |
---|
54 | {/if} |
---|
55 | |
---|
Note: See
TracBrowser
for help on using the repository browser.