Initial commit
This commit is contained in:
commit
28e6ddf404
1083 changed files with 191734 additions and 0 deletions
20
plugins/infinite-scroll/behaviors/cufon.js
Normal file
20
plugins/infinite-scroll/behaviors/cufon.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
--------------------------------
|
||||
Infinite Scroll Behavior
|
||||
Cufon Refresh
|
||||
--------------------------------
|
||||
+ https://github.com/paulirish/infinitescroll/
|
||||
+ version 2.0b2.110617
|
||||
+ Copyright 2011 Paul Irish & Luke Shumard
|
||||
+ Licensed under the MIT license
|
||||
|
||||
+ Documentation: http://infinite-scroll.com/
|
||||
|
||||
*/
|
||||
(function ($, undefined) {
|
||||
$.extend($.infinitescroll.prototype,{
|
||||
_callback_cufon: function infscr_callback_cufon(newElements) {
|
||||
Cufon.refresh(newElements);
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
26
plugins/infinite-scroll/behaviors/local.js
Normal file
26
plugins/infinite-scroll/behaviors/local.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Calculate internal height (used for local scroll)
|
||||
// this function is from the old localMode I think?
|
||||
function infsrc_local_hiddenHeight(element) {
|
||||
var height = 0;
|
||||
jQuery(element).children().each(function() {
|
||||
height = height + jQuery(this).outerHeight(false);
|
||||
});
|
||||
return height;
|
||||
}
|
||||
|
||||
jQuery.extend(jQuery.infinitescroll.prototype,{
|
||||
_nearbottom_local: function infscr_nearbottom_local() {
|
||||
var opts = this.options, instance = this,
|
||||
pixelsFromWindowBottomToBottom = infsrc_local_hiddenHeight(opts.binder)
|
||||
- jQuery(opts.binder).scrollTop() - jQuery(opts.binder).height();
|
||||
|
||||
if (opts.local_pixelsFromNavToBottom == undefined){
|
||||
opts.local_pixelsFromNavToBottom = infsrc_local_hiddenHeight(opts.binder) +
|
||||
jQuery(opts.binder).offset().top - jQuery(opts.navSelector).offset().top;
|
||||
}
|
||||
instance._debug('local math:', pixelsFromWindowBottomToBottom,
|
||||
opts.local_pixelsFromNavToBottom);
|
||||
|
||||
return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.local_pixelsFromNavToBottom);
|
||||
}
|
||||
});
|
61
plugins/infinite-scroll/behaviors/manual-trigger.js
Normal file
61
plugins/infinite-scroll/behaviors/manual-trigger.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
--------------------------------
|
||||
Infinite Scroll Behavior
|
||||
Manual / Twitter-style
|
||||
--------------------------------
|
||||
+ https://github.com/paulirish/infinitescroll/
|
||||
+ version 2.0b2.110617
|
||||
+ Copyright 2011 Paul Irish & Luke Shumard
|
||||
+ Licensed under the MIT license
|
||||
|
||||
+ Documentation: http://infinite-scroll.com/
|
||||
|
||||
*/
|
||||
|
||||
(function($, undefined) {
|
||||
$.extend($.infinitescroll.prototype,{
|
||||
|
||||
_setup_twitter: function infscr_setup_twitter () {
|
||||
var opts = this.options,
|
||||
instance = this;
|
||||
|
||||
// Bind nextSelector link to retrieve
|
||||
$(opts.nextSelector).click(function(e) {
|
||||
if (e.which == 1 && !e.metaKey && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
instance.retrieve();
|
||||
}
|
||||
});
|
||||
|
||||
// Define loadingStart to never hide pager
|
||||
instance.options.loading.start = function (opts) {
|
||||
opts.loading.msg
|
||||
.appendTo(opts.loading.selector)
|
||||
.show(opts.loading.speed, function () {
|
||||
instance.beginAjax(opts);
|
||||
});
|
||||
}
|
||||
},
|
||||
_showdonemsg_twitter: function infscr_showdonemsg_twitter () {
|
||||
var opts = this.options,
|
||||
instance = this;
|
||||
|
||||
//Do all the usual stuff
|
||||
opts.loading.msg
|
||||
.find('img')
|
||||
.hide()
|
||||
.parent()
|
||||
.find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
|
||||
$(this).parent().fadeOut('normal');
|
||||
});
|
||||
|
||||
//And also hide the navSelector
|
||||
$(opts.navSelector).fadeOut('normal');
|
||||
|
||||
// user provided callback when done
|
||||
opts.errorCallback.call($(opts.contentSelector)[0],'done');
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
})(jQuery);
|
21
plugins/infinite-scroll/behaviors/masonry-isotope.js
Normal file
21
plugins/infinite-scroll/behaviors/masonry-isotope.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
--------------------------------
|
||||
Infinite Scroll Behavior
|
||||
Masonry Integration
|
||||
--------------------------------
|
||||
+ https://github.com/paulirish/infinitescroll/
|
||||
+ version 2.0b2.110617
|
||||
+ Copyright 2011 Paul Irish & Luke Shumard
|
||||
+ Licensed under the MIT license
|
||||
|
||||
+ Documentation: http://infinite-scroll.com/
|
||||
|
||||
*/
|
||||
|
||||
(function($, undefined) {
|
||||
$.extend($.infinitescroll.prototype,{
|
||||
_callback_masonry: function infscr_callback_masonry (newElements) {
|
||||
$(this).masonry('appended',$(newElements));
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
19
plugins/infinite-scroll/behaviors/sausage.js
Normal file
19
plugins/infinite-scroll/behaviors/sausage.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
--------------------------------
|
||||
Infinite Scroll Behavior
|
||||
Sausage.js Integration
|
||||
--------------------------------
|
||||
+ https://github.com/paulirish/infinitescroll/
|
||||
+ version 2.0b2.110617
|
||||
+ Copyright 2011 Paul Irish & Luke Shumard
|
||||
+ Licensed under the MIT license
|
||||
|
||||
+ Documentation: http://infinite-scroll.com/
|
||||
|
||||
*/
|
||||
|
||||
(function($, undefined) {
|
||||
$.extend($.infinitescroll.prototype,{
|
||||
// TODO: Implement
|
||||
});
|
||||
})(jQuery);
|
Reference in a new issue