source: extensions/Slide/js/plugin/SlideGThumb.js @ 26889

Last change on this file since 26889 was 26889, checked in by Miklfe, 10 years ago
File size: 1.4 KB
Line 
1/*
2 * SlideGThumb - v1.0 - 01-01-2014
3 * plugin for Slide and GThumb+
4 * Original by P@t for GThumb+ : http://fr.piwigo.org/ext/extension_view.php?eid=591
5 * Modified by Miklfe : http://piwitheme.fr/
6 *
7 */
8 
9function _GThumb(){
10        var $layerShow  = $('body').data('layerShow');
11        if($('#the_page', $layerShow).hasClass('GThumb')) {
12                if ($('body').hasClass('GThumb')){
13                        $.getScript('./plugins/GThumb/js/jquery.ba-resize.min.js', function(){
14                                $.getScript('./plugins/GThumb/js/gthumb.js',function(){
15                                _Gthumb_init();
16                                $('body').removeClass('GThumb').addClass('GThumbReady');
17                                });
18                        })
19                }else{
20                        _Gthumb_init()
21                };
22        }
23        function _Gthumb_init(){
24                var     $ele                            = $('#the_page', $layerShow),
25                        $gthumb_opt             = $ele.data('slidegthumb'),
26                        $gthumb_big_id          = $ele.data ('gtid'),
27                        $gthumb_big_url         = $ele.data ('gturl'),
28                        $gthumb_big_w           = $ele.data ('gtw'),
29                        $gthumb_big_h           = $ele.data ('gth');
30                               
31                GThumb.max_height       = $gthumb_opt.height;
32                GThumb.margin           = $gthumb_opt.margin;
33                GThumb.method           = $gthumb_opt.method;
34                GThumb.big_thumb        = {id:$gthumb_big_id, src:$gthumb_big_url,width:$gthumb_big_w,height:$gthumb_big_h};
35
36                GThumb.build();
37                $(window).bind('RVTS_loaded', GThumb.build);
38                $('#thumbnails', $layerShow).resize(GThumb.process);
39                $('#thumbnails .gthumb', $layerShow).css({marginRight:GThumb.margin, marginBottom:GThumb.margin});
40        };
41};
Note: See TracBrowser for help on using the repository browser.