Rev | Line | |
---|
[11079] | 1 | {combine_script id='jquery.imgpreview' load='header' require='jquery' path='plugins/imgpreview/js/imgpreview.js'} |
---|
[11948] | 2 | |
---|
| 3 | {footer_script require='jquery.imgpreview'} |
---|
| 4 | {if isset($imgpreview)} |
---|
| 5 | {literal} |
---|
[12045] | 6 | jQuery('.thumbnails a, #thumbnails a').imgPreview({ |
---|
[11948] | 7 | containerID: 'tooltip', |
---|
| 8 | srcAttr: 'imgsrc', |
---|
| 9 | considerBorders:'true', |
---|
[13923] | 10 | {/literal}{if $imgpreview.preloadImages=="true"}preloadImages: true,{/if}{literal} |
---|
[11948] | 11 | // When container is shown: |
---|
| 12 | onShow: function(link){ |
---|
| 13 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
[13921] | 14 | jQuery('<span>' + jQuery(link).attr("data-tittle") + '</span>').appendTo(this); |
---|
[11948] | 15 | |
---|
| 16 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 17 | jQuery(link).stop().animate({opacity:0.4}); |
---|
[11948] | 18 | // Reset image: |
---|
[12045] | 19 | jQuery('img', this).stop().css({opacity:0}); |
---|
[11948] | 20 | {/literal}{/if}{literal} |
---|
| 21 | }, |
---|
| 22 | onLoad: function(){ |
---|
| 23 | {/literal}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 24 | jQuery(this).animate({opacity:1}, 300); |
---|
[11948] | 25 | {/literal}{/if}{literal} |
---|
| 26 | }, |
---|
| 27 | // When container hides: |
---|
| 28 | onHide: function(link){ |
---|
| 29 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
[12045] | 30 | jQuery('span', this).remove(); |
---|
[11948] | 31 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 32 | jQuery(link).stop().animate({opacity:1}); |
---|
[11948] | 33 | {/literal}{/if}{literal} |
---|
| 34 | } |
---|
| 35 | }); |
---|
| 36 | |
---|
| 37 | {/literal} |
---|
| 38 | {/if} |
---|
| 39 | {/footer_script} |
---|
| 40 | |
---|
[11079] | 41 | {combine_css path="plugins/imgpreview/css/imgpreview.css"} |
---|
[11086] | 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.