Changeset 12735 for extensions/rv_tscroller
- Timestamp:
- Dec 14, 2011, 9:51:08 PM (12 years ago)
- Location:
- extensions/rv_tscroller
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_tscroller/main.inc.php
r12713 r12735 1 1 <?php /* 2 2 Plugin Name: RV Thumb Scroller 3 Version: 2.3. c3 Version: 2.3.d 4 4 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=493 5 5 Description: Loads async using ajax thumbnails on index page as you scroll down the page … … 7 7 Author URI: http://www.modusoptimus.com 8 8 */ 9 define('RVTS_VERSION', '2.3. c');9 define('RVTS_VERSION', '2.3.d'); 10 10 11 11 class RVTS -
extensions/rv_tscroller/rv_tscroller.js
r12703 r12735 1 /* 2 Don't use directly. Compile on http://closure-compiler.appspot.com/home 3 */ 1 4 if (window.jQuery && window.RVTS) 2 5 (function($){ … … 41 44 var tBot=RVTS.$thumbs.position().top+RVTS.$thumbs.outerHeight() 42 45 ,wBot=$(window).scrollTop()+$(window).height(); 43 tBot -= !evt ? 0: 90; //begin 90 pixels before end46 tBot -= !evt ? 0:100; //begin 100 pixels before end 44 47 return tBot <= wBot ? (RVTS.doAutoScroll(),1) : 0; 45 48 }, -
extensions/rv_tscroller/rv_tscroller.min.js
r12703 r12735 1 window.jQuery&&window.RVTS&&function(a){a(".navigationBar").hide();RVTS=a.fn.extend(RVTS,{loading:0,adjust:0,doAutoScroll:function(){if(!(RVTS.loading||RVTS.start>=RVTS.total)){var b=RVTS.ajaxUrlModel.replace("%start%",RVTS.start).replace("%per%",RVTS.perPage);if(RVTS.adjust){b+="&adj="+RVTS.adjust;RVTS.adjust=0}a("#ajaxLoader").show();RVTS.loading=1;a.ajax({type:"GET",dataType:"html",url:b,success:function(c){RVTS.start+=RVTS.perPage;RVTS.$thumbs.append(c);if(RVTS.start>500&&RVTS.total>550){RVTS.$thumbs.after('<div style="text-align:center;font-size:180%;margin:0 0 20px"><a href="'+ 2 RVTS.moreUrlModel.replace("%start%",RVTS.start)+'">'+RVTS.moreMsg.replace("%d",RVTS.total-RVTS.start)+"</a></div>");RVTS.total=0}},complete:function(){RVTS.loading=0;a("#ajaxLoader").hide();a(window).trigger('RVTS_loaded')}})}},checkAutoScroll:function(b){var c=RVTS.$thumbs.position().top+RVTS.$thumbs.outerHeight(),d=a(window).scrollTop()+a(window).height();c-=!b?0:90;return c<=d?(RVTS.doAutoScroll(),1):0},engage:function(){var b=a(window);RVTS.$thumbs=a("#thumbnails");RVTS.$thumbs.append('<div id="ajaxLoader" style="display:none;position:fixed;bottom:32px;right:1%;z-index:999"><img src="'+ 3 RVTS.ajaxLoaderImage+'" width="128" height="15" alt="~"></div>');b.scrollTop(0);if(RVTS.$thumbs.outerHeight()<b.height())RVTS.adjust=1;else if(RVTS.$thumbs.height()>2*b.height())RVTS.adjust=-1;b.bind("scroll resize",RVTS.checkAutoScroll);RVTS.checkAutoScroll()&&window.setTimeout(RVTS.checkAutoScroll,1500)}});a(document).ready(function(){window.setTimeout(RVTS.engage,250)})}(jQuery); 1 window.jQuery&&window.RVTS&&function(a){a(".navigationBar").hide();RVTS=a.fn.extend(RVTS,{loading:0,adjust:0,doAutoScroll:function(){if(!(RVTS.loading||RVTS.start>=RVTS.total)){var b=RVTS.ajaxUrlModel.replace("%start%",RVTS.start).replace("%per%",RVTS.perPage);if(RVTS.adjust)b+="&adj="+RVTS.adjust,RVTS.adjust=0;a("#ajaxLoader").show();RVTS.loading=1;a.ajax({type:"GET",dataType:"html",url:b,success:function(a){RVTS.start+=RVTS.perPage;RVTS.$thumbs.append(a);if(500<RVTS.start&&550<RVTS.total)RVTS.$thumbs.after('<div style="text-align:center;font-size:180%;margin:0 0 20px"><a href="'+ RVTS.moreUrlModel.replace("%start%",RVTS.start)+'">'+RVTS.moreMsg.replace("%d",RVTS.total-RVTS.start)+"</a></div>"),RVTS.total=0},complete:function(){RVTS.loading=0;a("#ajaxLoader").hide();a(window).trigger("RVTS_loaded")}})}}, 2 checkAutoScroll:function(b){var c=RVTS.$thumbs.position().top+RVTS.$thumbs.outerHeight(),d=a(window).scrollTop()+a(window).height();return c-(!b?0:100)<=d?(RVTS.doAutoScroll(),1):0},engage:function(){var b=a(window);RVTS.$thumbs=a("#thumbnails");RVTS.$thumbs.append('<div id="ajaxLoader" style="display:none;position:fixed;bottom:32px;right:1%;z-index:999"><img src="'+ RVTS.ajaxLoaderImage+'" width="128" height="15" alt="~"></div>');b.scrollTop(0);if(RVTS.$thumbs.outerHeight()<b.height())RVTS.adjust=1;else if(RVTS.$thumbs.height()>2*b.height())RVTS.adjust=-1;b.bind("scroll resize",RVTS.checkAutoScroll);RVTS.checkAutoScroll()&&window.setTimeout(RVTS.checkAutoScroll,1500)}});a(document).ready(function(){window.setTimeout(RVTS.engage,250)})}(jQuery);
Note: See TracChangeset
for help on using the changeset viewer.