Plugin Directory

Changeset 407381


Ignore:
Timestamp:
07/09/2011 11:51:22 AM (15 years ago)
Author:
Beaver6813
Message:

2.0b2.110709

  • FIX: Default options not being recursively copied.
  • Updated to new options layout.
  • Callback fix.
Location:
infinite-scroll/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • infinite-scroll/trunk/jquery.infinitescroll.js

    r406362 r407381  
    44    --------------------------------
    55    + https://github.com/paulirish/infinitescroll
    6     + version 2.0b2.110706
     6    + version 2.0b2.110709
    77    + Copyright 2011 Paul Irish & Luke Shumard
    88    + Licensed under the MIT license
     
    107107            // If selectors from options aren't valid, return false
    108108            if (!this._validate(options)) { return false; }
    109 
    110109            // Define options and shorthand
    111             var opts = this.options = $.extend({}, $.infinitescroll.defaults, options),
     110            var opts = this.options = $.extend(true, {}, $.infinitescroll.defaults, options),
    112111                // get the relative URL - everything past the domain name.
    113112                relurl = /(.*?\/\/).*?(\/.*)/,
     
    140139               
    141140                $(opts.navSelector).hide();
    142 
    143141                opts.loading.msg
    144142                    .appendTo(opts.loading.selector)
  • infinite-scroll/trunk/jquery.infinitescroll.min.js

    r406362 r407381  
    44    --------------------------------
    55    + https://github.com/paulirish/infinitescroll
    6     + version 2.0b2.110706
     6    + version 2.0b2.110709
    77    + Copyright 2011 Paul Irish & Luke Shumard
    88    + Licensed under the MIT license
     
    1616return false;}
    1717if(binding=='unbind'){(this.options.binder).unbind('smartscroll.infscr.'+instance.options.infid);}else{(this.options.binder)[binding]('smartscroll.infscr.'+instance.options.infid,function(){instance.scroll();});};this._debug('Binding',binding);},_create:function infscr_create(options,callback){if(!this._validate(options)){return false;}
    18 var opts=this.options=$.extend({},$.infinitescroll.defaults,options),relurl=/(.*?\/\/).*?(\/.*)/,path=$(opts.nextSelector).attr('href');opts.contentSelector=opts.contentSelector||this.element;opts.loading.selector=opts.loading.selector||opts.contentSelector;if(!path){this._debug('Navigation selector not found');return;}
     18var opts=this.options=$.extend(true,{},$.infinitescroll.defaults,options),relurl=/(.*?\/\/).*?(\/.*)/,path=$(opts.nextSelector).attr('href');opts.contentSelector=opts.contentSelector||this.element;opts.loading.selector=opts.loading.selector||opts.contentSelector;if(!path){this._debug('Navigation selector not found');return;}
    1919opts.path=this._determinepath(path);opts.loading.msg=$('<div id="infscr-loading"><img alt="Loading..." src="'+opts.loading.img+'" /><div>'+opts.loading.msgText+'</div></div>');(new Image()).src=opts.loading.img;opts.pixelsFromNavToBottom=$(document).height()-$(opts.navSelector).offset().top;opts.loading.start=opts.loading.start||function(){$(opts.navSelector).hide();opts.loading.msg.appendTo(opts.loading.selector).show(opts.loading.speed,function(){beginAjax(opts);});};opts.loading.finished=opts.loading.finished||function(){opts.loading.msg.fadeOut('normal');};opts.callback=function(instance,data){if(!!opts.behavior&&instance['_callback_'+opts.behavior]!==undefined){instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0],data);}
    2020if(callback){callback.call($(opts.contentSelector)[0],data);}};this._setup();},_debug:function infscr_debug(){if(this.options.debug){return window.console&&console.log.call(console,arguments);}},_determinepath:function infscr_determinepath(path){var opts=this.options;if(!!opts.behavior&&this['_determinepath_'+opts.behavior]!==undefined){this['_determinepath_'+opts.behavior].call(this,path);return;}
  • infinite-scroll/trunk/readme.txt

    r406362 r407381  
    4949
    5050== Changelog ==
     51= 2.0b2.110709 =
     52* FIX: Default options not being recursively copied.
     53* Updated to new options layout.
     54* Callback fix.
     55
    5156= 2.0b2.110706 =
    5257* HTTPS loading image fix.
  • infinite-scroll/trunk/wp_infinite_scroll.php

    r406362 r407381  
    22/*
    33Plugin Name: Infinite Scroll
    4 Version: 2.0b2.110706
     4Version: 2.0b2.110709
    55Plugin URI: http://www.infinite-scroll.com
    66Description: Automatically loads the next page of posts into the bottom of the initial page.
     
    212212            {           
    213213            /* I always hated the way the old plugin outputted... so did my IDE... */
    214             echo "<script type=\"text/javascript\"> if (!(window.jQuery && jQuery.fn.jquery >= '1.5')){document.write(unescape(\"%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E\"));}</script>";
     214            echo "<script type=\"text/javascript\"> if (!(window.jQuery && jQuery.fn.jquery >= '1.6')){document.write(unescape(\"%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E\"));}</script>";
    215215            if($debug=="true")
    216216                echo "<script type=\"text/javascript\" src=\"$plugin_dir/jquery.infinitescroll.js\"></script>";
     
    222222                    $('$content_selector').infinitescroll({
    223223                        debug           : $debug,
     224                        loading         : {
     225                            img         : \"$loading_image\",
     226                            msgText     : \"$loading_text\",
     227                            finishedMsg : \"$donetext\"
     228                            },
     229                        state           : {
     230                            currPage    : \"$current_page\"
     231                            },
    224232                        nextSelector    : \"$next_selector\",
    225                         loadingImg      : \"$loading_image\",
    226                         loadingText     : \"$loading_text\",
    227                         donetext        : \"$donetext\",
    228233                        navSelector     : \"$navigation_selector\",
    229234                        contentSelector : \"$content_selector\",
    230235                        itemSelector    : \"$post_selector\",
    231                         currPage        : \"$current_page\",
    232                         pathParse       : [\"{$pathParse[0]}\", \"{$pathParse[1]}\"],
    233                         callback        : function() { $js_calls }
    234                         });
     236                        pathParse       : [\"{$pathParse[0]}\", \"{$pathParse[1]}\"]
     237                        }, function() { $js_calls } );
    235238                    });
    236239                    </script>";
Note: See TracChangeset for help on using the changeset viewer.