Changeset 27025 for extensions/Slide


Ignore:
Timestamp:
Jan 27, 2014, 10:40:46 PM (10 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slide/js/plugin/SlideLightbox.js

    r26890 r27025  
    77 */
    88 
    9  function _lightbox(){
    10 };
     9/*$template->func_combine_script(array('id'=>'jquery.colorbox', 'path'=>'themes/default/js/plugins/jquery.colorbox.min.js'));
     10$template->func_combine_css(array('id'=>'colorbox','path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css'));*/
     11        function _lightbox(){
     12       
     13                        var $layerShow  = $('body').data('layerShow'),
     14                                $lightbox_opt = $('#the_page', $layerShow).data('lightbox');
     15                        if ($('body').hasClass('lightbox')){
     16                                $('body').removeClass('lightbox').addClass('lightboxReady');
     17                        $.getScript('./themes/default/js/plugins/jquery.colorbox.min.js', function(){
     18                        $('<style />', {
     19                                type: "text/css",
     20                                src     : "plugins/lightbox/theme/' + $lightbox_opt.theme + '/colorbox.css",
     21                        }).appendTo('head');
     22                                _lightbox_init($layerShow,$lightbox_opt)
     23                        })
     24                }else{
     25                        _lightbox_init($layerShow,$lightbox_opt)
     26                };
     27       
     28       
     29       
     30                function _lightbox_init($layerShow,$lightbox_opt){
     31                               
     32                                $('a[rel=colorbox0]').attr("href", function () {
     33                                        return this.name;
     34                                });
     35                                $('a[rel=colorbox0]').colorbox({
     36                                        current: "",
     37                                        transition: $lightbox_opt.transition,
     38                                        speed: $lightbox_opt.speed,
     39                                        initialWidth: $lightbox_opt.initialWidth,
     40                                        initialHeight: $lightbox_opt.initialHeight,
     41                                        width: $lightbox_opt.width,
     42                                        height: $lightbox_opt.height
     43                                },
     44                                function() {
     45                                        $.post("plugins/lightbox/save_history.php", {
     46                                                imgid: this.id,
     47                                                catid: $lightbox_opt.catid,
     48                                                section: $lightbox_opt.section,
     49                                                tagids: $lightbox_opt.tagids
     50                                        });
     51                                });
    1152                       
     53                        $(document).ready(PWG_Colorbox);
     54                        $(window).bind("RVTS_loaded", PWG_Colorbox);
     55                }
     56        };
     57
     58                       
Note: See TracChangeset for help on using the changeset viewer.