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', |
---|
| 10 | // When container is shown: |
---|
| 11 | onShow: function(link){ |
---|
| 12 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
[12045] | 13 | jQuery('<span>' + jQuery(link).children().attr("title") + '</span>').appendTo(this); |
---|
[11948] | 14 | |
---|
| 15 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 16 | jQuery(link).stop().animate({opacity:0.4}); |
---|
[11948] | 17 | // Reset image: |
---|
[12045] | 18 | jQuery('img', this).stop().css({opacity:0}); |
---|
[11948] | 19 | {/literal}{/if}{literal} |
---|
| 20 | }, |
---|
| 21 | onLoad: function(){ |
---|
| 22 | {/literal}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 23 | jQuery(this).animate({opacity:1}, 300); |
---|
[11948] | 24 | {/literal}{/if}{literal} |
---|
| 25 | }, |
---|
| 26 | // When container hides: |
---|
| 27 | onHide: function(link){ |
---|
| 28 | {/literal}{if $imgpreview.title=="true"}{literal} |
---|
[12045] | 29 | jQuery('span', this).remove(); |
---|
[11948] | 30 | {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} |
---|
[12045] | 31 | jQuery(link).stop().animate({opacity:1}); |
---|
[11948] | 32 | {/literal}{/if}{literal} |
---|
| 33 | } |
---|
| 34 | }); |
---|
| 35 | |
---|
| 36 | {/literal} |
---|
| 37 | {/if} |
---|
| 38 | {/footer_script} |
---|
| 39 | |
---|
[11079] | 40 | {combine_css path="plugins/imgpreview/css/imgpreview.css"} |
---|
[11086] | 41 | {if isset($imgpreview)} |
---|
| 42 | {html_head} |
---|
| 43 | {literal} |
---|
| 44 | <style> |
---|
| 45 | #tooltip img { |
---|
| 46 | {/literal} |
---|
| 47 | max-height: {$imgpreview.height}px; |
---|
| 48 | max-width: {$imgpreview.width}px; |
---|
| 49 | {literal} |
---|
| 50 | } |
---|
| 51 | </style> |
---|
| 52 | {/literal}{/html_head} |
---|
| 53 | {/if} |
---|
| 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.