source: extensions/imgpreview/css_js.tpl @ 21683

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

compatible RV thumb scroller

File size: 1.7 KB
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}
6function apply_imgPreview() {
7jQuery('.thumbnails a, #thumbnails a').imgPreview({
8    containerID: 'tooltip',
9                srcAttr: 'imgsrc',
10                considerBorders:'true',
11    {/literal}{if $imgpreview.preloadImages=="true"}preloadImages: true,{/if}{literal}
12    // When container is shown:
13    onShow: function(link){
14      {/literal}{if $imgpreview.title=="true"}{literal}
15      jQuery('<span>' + jQuery(link).attr("data-tittle") + '</span>').appendTo(this);
16     
17      {/literal}{/if}{if $imgpreview.opacity=="true"}{literal}
18      jQuery(link).stop().animate({opacity:0.4});
19      // Reset image:
20      jQuery('img', this).stop().css({opacity:0});
21      {/literal}{/if}{literal}
22    },
23    onLoad: function(){
24      {/literal}{if $imgpreview.opacity=="true"}{literal}
25      jQuery(this).animate({opacity:1}, 300);
26      {/literal}{/if}{literal}
27    },
28    // When container hides:
29    onHide: function(link){
30      {/literal}{if $imgpreview.title=="true"}{literal}
31      jQuery('span', this).remove();
32      {/literal}{/if}{if $imgpreview.opacity=="true"}{literal}
33      jQuery(link).stop().animate({opacity:1});
34      {/literal}{/if}{literal}
35    }
36});
37};
38jQuery(document).ready(apply_imgPreview);
39jQuery(window).bind("RVTS_loaded", apply_imgPreview);
40{/literal}
41{/if}
42{/footer_script}
43
44{combine_css path="plugins/imgpreview/css/imgpreview.css"}
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.