-
Notifications
You must be signed in to change notification settings - Fork 2
/
css_js.tpl
58 lines (54 loc) · 1.7 KB
/
css_js.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{combine_script id='jquery.imgpreview' load='header' require='jquery' path='plugins/imgpreview/js/imgpreview.js'}
{footer_script require='jquery.imgpreview'}
{if isset($imgpreview)}
{literal}
function apply_imgPreview() {
jQuery('.thumbnails a, #thumbnails a').imgPreview({
containerID: 'tooltip',
srcAttr: 'imgsrc',
considerBorders:'true',
{/literal}{if $imgpreview.preloadImages=="true"}preloadImages: true,{/if}{literal}
// When container is shown:
onShow: function(link){
{/literal}{if $imgpreview.title=="true"}{literal}
jQuery('<span>' + jQuery(link).attr("data-tittle") + '</span>').appendTo(this);
{/literal}{/if}{if $imgpreview.opacity=="true"}{literal}
jQuery(link).stop().animate({opacity:0.4});
// Reset image:
jQuery('img', this).stop().css({opacity:0});
{/literal}{/if}{literal}
},
onLoad: function(){
{/literal}{if $imgpreview.opacity=="true"}{literal}
jQuery(this).animate({opacity:1}, 300);
{/literal}{/if}{literal}
},
// When container hides:
onHide: function(link){
{/literal}{if $imgpreview.title=="true"}{literal}
jQuery('span', this).remove();
{/literal}{/if}{if $imgpreview.opacity=="true"}{literal}
jQuery(link).stop().animate({opacity:1});
{/literal}{/if}{literal}
}
});
};
jQuery(document).ready(apply_imgPreview);
jQuery(window).bind("RVTS_loaded", apply_imgPreview);
{/literal}
{/if}
{/footer_script}
{combine_css path="plugins/imgpreview/css/imgpreview.css"}
{if isset($imgpreview)}
{html_head}
{literal}
<style>
#tooltip img {
{/literal}
max-height: {$imgpreview.height}px;
max-width: {$imgpreview.width}px;
{literal}
}
</style>
{/literal}{/html_head}
{/if}