source: extensions/imgpreview/css_js.tpl @ 31980

Last change on this file since 31980 was 17739, checked in by flop25, 12 years ago

compatible RV thumb scroller

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