Changeset 13453 for extensions/rv_tscroller
- Timestamp:
- Mar 1, 2012, 5:30:55 PM (13 years ago)
- Location:
- extensions/rv_tscroller
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_tscroller/rv_tscroller.js
r13194 r13453 40 40 RVTS.loading || $('#ajaxLoader').hide(); 41 41 $(window).trigger('RVTS_loaded'); 42 if (typeof pwg_ajax_thumbnails_loader != 'undefined') 43 pwg_ajax_thumbnails_loader(); 42 44 } 43 45 }); … … 71 73 RVTS.loadingUp || $('#ajaxLoader').hide(); 72 74 $(window).trigger('RVTS_loaded'); 75 if (typeof pwg_ajax_thumbnails_loader != 'undefined') 76 pwg_ajax_thumbnails_loader(); 73 77 } 74 78 }); -
extensions/rv_tscroller/rv_tscroller.min.js
r13194 r13453 1 window.jQuery&&window.RVTS&&function(a){a(".navigationBar").hide();if(0<RVTS.start){var d=a(".navigationBar A[rel=first]"),d='<a href="'+d.attr("href")+'">'+d.html()+"</a> | ";a("#thumbnails").before('<div id=rvtsUp style="text-align:center;font-size:120%;margin:10px">'+d+'<a href="javascript:RVTS.loadUp()">'+RVTS.prevMsg+"</a></div>")}RVTS=a.fn.extend(RVTS,{loading:0,loadingUp:0,adjust:0,loadUp:function(){if(!(RVTS.loadingUp||0>=RVTS.start)){var b=RVTS.start-RVTS.perPage,c=RVTS.perPage;0>b&&(c+= b,b=0);c=RVTS.ajaxUrlModel.replace("%start%",b).replace("%per%",c);a("#ajaxLoader").show();RVTS.loadingUp=1;a.ajax({type:"GET",dataType:"html",url:c,success:function(c){RVTS.start=b;RVTS.$thumbs.prepend(c);0>=RVTS.start&&a("#rvtsUp").remove()},complete:function(){RVTS.loadingUp=0;RVTS.loading||a("#ajaxLoader").hide();a(window).trigger("RVTS_loaded") }})}},2 doAutoScroll:function(){if(!(RVTS.loading||RVTS.next>=RVTS.total)){var b=RVTS.ajaxUrlModel.replace("%start%",RVTS.next).replace("%per%",RVTS.perPage); 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.next+=RVTS.perPage;RVTS.$thumbs.append(a);500<RVTS.next-RVTS.start&&50<RVTS.total-RVTS.next&&(RVTS.$thumbs.after('<div style="text-align:center;font-size:180%;margin:0 0 20px"><a href="'+RVTS.moreUrlModel.replace("%start%",RVTS.next)+'">'+RVTS.moreMsg.replace("%d",RVTS.total-RVTS.next)+"</a></div>"),RVTS.total=0)},complete:function(){RVTS.loading= 0;RVTS.loadingUp||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();return c-(!b?0:100)<=d?(RVTS.doAutoScroll(),1):0},engage:function(){var b=a(window);RVTS.$thumbs=a("#thumbnails");RVTS.$thumbs.after('<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);RVTS.$thumbs.outerHeight()<b.height()?RVTS.adjust=1: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();if(0<RVTS.start){var d=a(".navigationBar A[rel=first]"),d='<a href="'+d.attr("href")+'">'+d.html()+"</a> | ";a("#thumbnails").before('<div id=rvtsUp style="text-align:center;font-size:120%;margin:10px">'+d+'<a href="javascript:RVTS.loadUp()">'+RVTS.prevMsg+"</a></div>")}RVTS=a.fn.extend(RVTS,{loading:0,loadingUp:0,adjust:0,loadUp:function(){if(!(RVTS.loadingUp||0>=RVTS.start)){var b=RVTS.start-RVTS.perPage,c=RVTS.perPage;0>b&&(c+= b,b=0);c=RVTS.ajaxUrlModel.replace("%start%",b).replace("%per%",c);a("#ajaxLoader").show();RVTS.loadingUp=1;a.ajax({type:"GET",dataType:"html",url:c,success:function(c){RVTS.start=b;RVTS.$thumbs.prepend(c);0>=RVTS.start&&a("#rvtsUp").remove()},complete:function(){RVTS.loadingUp=0;RVTS.loading||a("#ajaxLoader").hide();a(window).trigger("RVTS_loaded");typeof pwg_ajax_thumbnails_loader!='undefined'&&pwg_ajax_thumbnails_loader()}})}}, 2 doAutoScroll:function(){if(!(RVTS.loading||RVTS.next>=RVTS.total)){var b=RVTS.ajaxUrlModel.replace("%start%",RVTS.next).replace("%per%",RVTS.perPage); 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.next+=RVTS.perPage;RVTS.$thumbs.append(a);500<RVTS.next-RVTS.start&&50<RVTS.total-RVTS.next&&(RVTS.$thumbs.after('<div style="text-align:center;font-size:180%;margin:0 0 20px"><a href="'+RVTS.moreUrlModel.replace("%start%",RVTS.next)+'">'+RVTS.moreMsg.replace("%d",RVTS.total-RVTS.next)+"</a></div>"),RVTS.total=0)},complete:function(){RVTS.loading= 0;RVTS.loadingUp||a("#ajaxLoader").hide();a(window).trigger("RVTS_loaded");typeof pwg_ajax_thumbnails_loader!='undefined'&&pwg_ajax_thumbnails_loader()}})}},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.after('<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);RVTS.$thumbs.outerHeight()<b.height()?RVTS.adjust=1: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.