From 0a39543cc1861051aad2486b9f5cdcd172142444 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 14:20:31 -0300 Subject: [PATCH 01/23] Update js/pear.js --- js/pear.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/pear.js b/js/pear.js index 104c809..7773373 100644 --- a/js/pear.js +++ b/js/pear.js @@ -472,7 +472,7 @@ function switchToGrid() { if (!$('#gridContainer').length) { return; } scaleIt($('#imgSlider').slider('value')); $('#mosaicDetail').hide(); - $('#gridContainer').css('width', "100%"); + $('#outerContainer').css('width', "100%"); $('p.giTitle,div.giInfo').each(function (s) { $(this).show(); }); switchMode('grid'); mosaicResize(); @@ -485,7 +485,7 @@ function switchToMosaic() { if (!$('#gridContainer').length) { return; } scaleIt($('#imgSlider').slider('value')); $('#mosaicDetail').show(); - $('#gridContainer').css('width', "35%"); + $('#outerContainer').css('width', "35%"); $('p.giTitle,div.giInfo').each(function (s) { $(this).hide(); }); switchMode('mosaic'); swatchImg(pear.currentImg); From f283517e68e1289dd681452b117a2467e4184912 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 14:21:39 -0300 Subject: [PATCH 02/23] Update css/pear.css --- css/pear.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/css/pear.css b/css/pear.css index b58f545..10202f8 100644 --- a/css/pear.css +++ b/css/pear.css @@ -200,7 +200,15 @@ outline: medium none; margin: 0; padding: 0; height: 100%; - width: 35%; + width: 100%; +} + +#outerContainer{ + position: absolute; + right: 0; + margin: 0; + height: 100%; + width: 100%; } #sidebarContainer { From 466b6a88b16b55ffb8e2bf78abc684d0b799cc2a Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 14:22:41 -0300 Subject: [PATCH 03/23] Update views/album.html.php --- views/album.html.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/views/album.html.php b/views/album.html.php index 8db6b7f..ebcd552 100644 --- a/views/album.html.php +++ b/views/album.html.php @@ -41,8 +41,10 @@ - From fd70e7e6030228658554fc09c30071accbd327cc Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 14:23:44 -0300 Subject: [PATCH 04/23] Update views/page.html.php --- views/page.html.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/page.html.php b/views/page.html.php index f5b040d..c26a2c5 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -99,12 +99,15 @@ script("ui.init.js") ?> script("jquery.parsequery.js") ?> script("imageflow.packed.js") ?> + script("jquery.mousewheel.js") ?> + script("jquery.jscrollpane.min.js") ?> css("yui/reset-fonts-grids.css") ?> css("superfish/css/superfish.css") ?> css("ui-pear-theme/jquery-ui-1.8.17.custom.css") ?> css("screen.css") ?> css("imageflow.packed.css") ?> css("pear.css") ?> + css("jquery.jscrollpane.css") ?> get_combined("script") ?> From af4191f4eb49b8a9caff80b0a4c134e54c6e5823 Mon Sep 17 00:00:00 2001 From: Thomas W Date: Sun, 19 Aug 2012 13:37:53 -0400 Subject: [PATCH 05/23] jScrollPane implementation --- js/jquery.jscrollpane.min.js | 11 +++++ js/jquery.mousewheel.js | 84 ++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 js/jquery.jscrollpane.min.js create mode 100644 js/jquery.mousewheel.js diff --git a/js/jquery.jscrollpane.min.js b/js/jquery.jscrollpane.min.js new file mode 100644 index 0000000..e34ffd6 --- /dev/null +++ b/js/jquery.jscrollpane.min.js @@ -0,0 +1,11 @@ +/* + * jScrollPane - v2.0.0beta12 - 2012-07-24 + * http://jscrollpane.kelvinluck.com/ + * + * Copyright (c) 2010 Kelvin Luck + * Dual licensed under the MIT and GPL licenses. + */ +(function(b,a,c){b.fn.jScrollPane=function(e){function d(D,O){var ay,Q=this,Y,aj,v,al,T,Z,y,q,az,aE,au,i,I,h,j,aa,U,ap,X,t,A,aq,af,am,G,l,at,ax,x,av,aH,f,L,ai=true,P=true,aG=false,k=false,ao=D.clone(false,false).empty(),ac=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aH=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");f=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function ar(aQ){var aL,aN,aM,aJ,aI,aP,aO=false,aK=false;ay=aQ;if(Y===c){aI=D.scrollTop();aP=D.scrollLeft();D.css({overflow:"hidden",padding:0});aj=D.innerWidth()+f;v=D.innerHeight();D.width(aj);Y=b('
').css("padding",aH).append(D.children());al=b('
').css({width:aj+"px",height:v+"px"}).append(Y).appendTo(D)}else{D.css("width","");aO=ay.stickToBottom&&K();aK=ay.stickToRight&&B();aJ=D.innerWidth()+f!=aj||D.outerHeight()!=v;if(aJ){aj=D.innerWidth()+f;v=D.innerHeight();al.css({width:aj+"px",height:v+"px"})}if(!aJ&&L==T&&Y.outerHeight()==Z){D.width(aj);return}L=T;Y.css("width","");D.width(aj);al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Y.css("overflow","auto");if(aQ.contentWidth){T=aQ.contentWidth}else{T=Y[0].scrollWidth}Z=Y[0].scrollHeight;Y.css("overflow","");y=T/aj;q=Z/v;az=q>1;aE=y>1;if(!(aE||az)){D.removeClass("jspScrollable");Y.css({top:0,width:al.width()-f});n();E();R();w()}else{D.addClass("jspScrollable");aL=ay.maintainPosition&&(I||aa);if(aL){aN=aC();aM=aA()}aF();z();F();if(aL){N(aK?(T-aj):aN,false);M(aO?(Z-v):aM,false)}J();ag();an();if(ay.enableKeyboardNavigation){S()}if(ay.clickOnTrack){p()}C();if(ay.hijackInternalLinks){m()}}if(ay.autoReinitialise&&!av){av=setInterval(function(){ar(ay)},ay.autoReinitialiseDelay)}else{if(!ay.autoReinitialise&&av){clearInterval(av)}}aI&&D.scrollTop(0)&&M(aI,false);aP&&D.scrollLeft(0)&&N(aP,false);D.trigger("jsp-initialised",[aE||az])}function aF(){if(az){al.append(b('
').append(b('
'),b('
').append(b('
').append(b('
'),b('
'))),b('
')));U=al.find(">.jspVerticalBar");ap=U.find(">.jspTrack");au=ap.find(">.jspDrag");if(ay.showArrows){aq=b('').bind("mousedown.jsp",aD(0,-1)).bind("click.jsp",aB);af=b('').bind("mousedown.jsp",aD(0,1)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){aq.bind("mouseover.jsp",aD(0,-1,aq));af.bind("mouseover.jsp",aD(0,1,af))}ak(ap,ay.verticalArrowPositions,aq,af)}t=v;al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){t-=b(this).outerHeight()});au.hover(function(){au.addClass("jspHover")},function(){au.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);au.addClass("jspActive");var s=aI.pageY-au.position().top;b("html").bind("mousemove.jsp",function(aJ){V(aJ.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});o()}}function o(){ap.height(t+"px");I=0;X=ay.verticalGutter+ap.outerWidth();Y.width(aj-X-f);try{if(U.position().left===0){Y.css("margin-left",X+"px")}}catch(s){}}function z(){if(aE){al.append(b('
').append(b('
'),b('
').append(b('
').append(b('
'),b('
'))),b('
')));am=al.find(">.jspHorizontalBar");G=am.find(">.jspTrack");h=G.find(">.jspDrag");if(ay.showArrows){ax=b('').bind("mousedown.jsp",aD(-1,0)).bind("click.jsp",aB);x=b('').bind("mousedown.jsp",aD(1,0)).bind("click.jsp",aB); +if(ay.arrowScrollOnHover){ax.bind("mouseover.jsp",aD(-1,0,ax));x.bind("mouseover.jsp",aD(1,0,x))}ak(G,ay.horizontalArrowPositions,ax,x)}h.hover(function(){h.addClass("jspHover")},function(){h.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);h.addClass("jspActive");var s=aI.pageX-h.position().left;b("html").bind("mousemove.jsp",function(aJ){W(aJ.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});l=al.innerWidth();ah()}}function ah(){al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){l-=b(this).outerWidth()});G.width(l+"px");aa=0}function F(){if(aE&&az){var aI=G.outerHeight(),s=ap.outerWidth();t-=aI;b(am).find(">.jspCap:visible,>.jspArrow").each(function(){l+=b(this).outerWidth()});l-=s;v-=s;aj-=aI;G.parent().append(b('
').css("width",aI+"px"));o();ah()}if(aE){Y.width((al.outerWidth()-f)+"px")}Z=Y.outerHeight();q=Z/v;if(aE){at=Math.ceil(1/y*l);if(at>ay.horizontalDragMaxWidth){at=ay.horizontalDragMaxWidth}else{if(atay.verticalDragMaxHeight){A=ay.verticalDragMaxHeight}else{if(AaS){Q.scrollByY(-aP)}else{V(aS)}}else{if(aM>0){if(I+aQaS){Q.scrollByX(-aP)}else{W(aS)}}else{if(aM>0){if(aa+aQi){s=i}}if(aI===c){aI=ay.animateScroll}if(aI){Q.animate(au,"top",s,ad)}else{au.css("top",s);ad(s)}}function ad(aI){if(aI===c){aI=au.position().top}al.scrollTop(0);I=aI;var aL=I===0,aJ=I==i,aK=aI/i,s=-aK*(Z-v);if(ai!=aL||aG!=aJ){ai=aL;aG=aJ;D.trigger("jsp-arrow-change",[ai,aG,P,k])}u(aL,aJ);Y.css("top",s);D.trigger("jsp-scroll-y",[-s,aL,aJ]).trigger("scroll")}function W(aI,s){if(!aE){return}if(aI<0){aI=0}else{if(aI>j){aI=j}}if(s===c){s=ay.animateScroll}if(s){Q.animate(h,"left",aI,ae) +}else{h.css("left",aI);ae(aI)}}function ae(aI){if(aI===c){aI=h.position().left}al.scrollTop(0);aa=aI;var aL=aa===0,aK=aa==j,aJ=aI/j,s=-aJ*(T-aj);if(P!=aL||k!=aK){P=aL;k=aK;D.trigger("jsp-arrow-change",[ai,aG,P,k])}r(aL,aK);Y.css("left",s);D.trigger("jsp-scroll-x",[-s,aL,aK]).trigger("scroll")}function u(aI,s){if(ay.showArrows){aq[aI?"addClass":"removeClass"]("jspDisabled");af[s?"addClass":"removeClass"]("jspDisabled")}}function r(aI,s){if(ay.showArrows){ax[aI?"addClass":"removeClass"]("jspDisabled");x[s?"addClass":"removeClass"]("jspDisabled")}}function M(s,aI){var aJ=s/(Z-v);V(aJ*i,aI)}function N(aI,s){var aJ=aI/(T-aj);W(aJ*j,s)}function ab(aV,aQ,aJ){var aN,aK,aL,s=0,aU=0,aI,aP,aO,aS,aR,aT;try{aN=b(aV)}catch(aM){return}aK=aN.outerHeight();aL=aN.outerWidth();al.scrollTop(0);al.scrollLeft(0);while(!aN.is(".jspPane")){s+=aN.position().top;aU+=aN.position().left;aN=aN.offsetParent();if(/^body|html$/i.test(aN[0].nodeName)){return}}aI=aA();aO=aI+v;if(saO){aR=s-v+aK+ay.verticalGutter}}if(aR){M(aR,aJ)}aP=aC();aS=aP+aj;if(aUaS){aT=aU-aj+aL+ay.horizontalGutter}}if(aT){N(aT,aJ)}}function aC(){return -Y.position().left}function aA(){return -Y.position().top}function K(){var s=Z-v;return(s>20)&&(s-aA()<10)}function B(){var s=T-aj;return(s>20)&&(s-aC()<10)}function ag(){al.unbind(ac).bind(ac,function(aL,aM,aK,aI){var aJ=aa,s=I;Q.scrollBy(aK*ay.mouseWheelSpeed,-aI*ay.mouseWheelSpeed,false);return aJ==aa&&s==I})}function n(){al.unbind(ac)}function aB(){return false}function J(){Y.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){ab(s.target,false)})}function E(){Y.find(":input,a").unbind("focus.jsp")}function S(){var s,aI,aK=[];aE&&aK.push(am[0]);az&&aK.push(U[0]);Y.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aN){if(aN.target!==this&&!(aK.length&&b(aN.target).closest(aK).length)){return}var aM=aa,aL=I;switch(aN.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aN.keyCode;aJ();break;case 35:M(Z-v);s=null;break;case 36:M(0);s=null;break}aI=aN.keyCode==s&&aM!=aa||aL!=I;return !aI}).bind("keypress.jsp",function(aL){if(aL.keyCode==s){aJ()}return !aI});if(ay.hideFocus){D.css("outline","none");if("hideFocus" in al[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus" in al[0]){D.attr("hideFocus",false)}}function aJ(){var aM=aa,aL=I;switch(s){case 40:Q.scrollByY(ay.keyboardSpeed,false);break;case 38:Q.scrollByY(-ay.keyboardSpeed,false);break;case 34:case 32:Q.scrollByY(v*ay.scrollPagePercent,false);break;case 33:Q.scrollByY(-v*ay.scrollPagePercent,false);break;case 39:Q.scrollByX(ay.keyboardSpeed,false);break;case 37:Q.scrollByX(-ay.keyboardSpeed,false);break}aI=aM!=aa||aL!=I;return aI}}function R(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aK,aI,aJ=escape(location.hash.substr(1));try{aK=b("#"+aJ+', a[name="'+aJ+'"]')}catch(s){return}if(aK.length&&Y.find(aJ)){if(al.scrollTop()===0){aI=setInterval(function(){if(al.scrollTop()>0){ab(aK,true);b(document).scrollTop(al.position().top);clearInterval(aI)}},50)}else{ab(aK,true);b(document).scrollTop(al.position().top)}}}}function m(){if(b(document.body).data("jspHijack")){return}b(document.body).data("jspHijack",true);b(document.body).delegate("a[href*=#]","click",function(s){var aI=this.href.substr(0,this.href.indexOf("#")),aK=location.href,aO,aP,aJ,aM,aL,aN;if(location.href.indexOf("#")!==-1){aK=location.href.substr(0,location.href.indexOf("#"))}if(aI!==aK){return}aO=escape(this.href.substr(this.href.indexOf("#")+1));aP;try{aP=b("#"+aO+', a[name="'+aO+'"]')}catch(aQ){return}if(!aP.length){return}aJ=aP.closest(".jspScrollable");aM=aJ.data("jsp");aM.scrollToElement(aP,true);if(aJ[0].scrollIntoView){aL=b(a).scrollTop();aN=aP.offset().top;if(aNaL+b(a).height()){aJ[0].scrollIntoView()}}s.preventDefault() +})}function an(){var aJ,aI,aL,aK,aM,s=false;al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aN){var aO=aN.originalEvent.touches[0];aJ=aC();aI=aA();aL=aO.pageX;aK=aO.pageY;aM=false;s=true}).bind("touchmove.jsp",function(aQ){if(!s){return}var aP=aQ.originalEvent.touches[0],aO=aa,aN=I;Q.scrollTo(aJ+aL-aP.pageX,aI+aK-aP.pageY);aM=aM||Math.abs(aL-aP.pageX)>5||Math.abs(aK-aP.pageY)>5;return aO==aa&&aN==I}).bind("touchend.jsp",function(aN){s=false}).bind("click.jsp-touchclick",function(aN){if(aM){aM=false;return false}})}function g(){var s=aA(),aI=aC();D.removeClass("jspScrollable").unbind(".jsp");D.replaceWith(ao.append(Y.children()));ao.scrollTop(s);ao.scrollLeft(aI);if(av){clearInterval(av)}}b.extend(Q,{reinitialise:function(aI){aI=b.extend({},ay,aI);ar(aI)},scrollToElement:function(aJ,aI,s){ab(aJ,aI,s)},scrollTo:function(aJ,s,aI){N(aJ,aI);M(s,aI)},scrollToX:function(aI,s){N(aI,s)},scrollToY:function(s,aI){M(s,aI)},scrollToPercentX:function(aI,s){N(aI*(T-aj),s)},scrollToPercentY:function(aI,s){M(aI*(Z-v),s)},scrollBy:function(aI,s,aJ){Q.scrollByX(aI,aJ);Q.scrollByY(s,aJ)},scrollByX:function(s,aJ){var aI=aC()+Math[s<0?"floor":"ceil"](s),aK=aI/(T-aj);W(aK*j,aJ)},scrollByY:function(s,aJ){var aI=aA()+Math[s<0?"floor":"ceil"](s),aK=aI/(Z-v);V(aK*i,aJ)},positionDragX:function(s,aI){W(s,aI)},positionDragY:function(aI,s){V(aI,s)},animate:function(aI,aL,s,aK){var aJ={};aJ[aL]=s;aI.animate(aJ,{duration:ay.animateDuration,easing:ay.animateEase,queue:false,step:aK})},getContentPositionX:function(){return aC()},getContentPositionY:function(){return aA()},getContentWidth:function(){return T},getContentHeight:function(){return Z},getPercentScrolledX:function(){return aC()/(T-aj)},getPercentScrolledY:function(){return aA()/(Z-v)},getIsScrollableH:function(){return aE},getIsScrollableV:function(){return az},getContentPane:function(){return Y},scrollToBottom:function(s){V(i,s)},hijackInternalLinks:b.noop,destroy:function(){g()}});ar(O)}e=b.extend({},b.fn.jScrollPane.defaults,e);b.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){e[this]=e[this]||e.speed});return this.each(function(){var f=b(this),g=f.data("jsp");if(g){g.reinitialise(e)}else{b("script",f).filter('[type="text/javascript"],not([type])').remove();g=new d(f,e);f.data("jsp",g)}})};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this); \ No newline at end of file diff --git a/js/jquery.mousewheel.js b/js/jquery.mousewheel.js new file mode 100644 index 0000000..38b6095 --- /dev/null +++ b/js/jquery.mousewheel.js @@ -0,0 +1,84 @@ +/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) + * Licensed under the MIT License (LICENSE.txt). + * + * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. + * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. + * Thanks to: Seamus Leahy for adding deltaX and deltaY + * + * Version: 3.0.6 + * + * Requires: 1.2.2+ + */ + +(function($) { + +var types = ['DOMMouseScroll', 'mousewheel']; + +if ($.event.fixHooks) { + for ( var i=types.length; i; ) { + $.event.fixHooks[ types[--i] ] = $.event.mouseHooks; + } +} + +$.event.special.mousewheel = { + setup: function() { + if ( this.addEventListener ) { + for ( var i=types.length; i; ) { + this.addEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i=types.length; i; ) { + this.removeEventListener( types[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + } +}; + +$.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + }, + + unmousewheel: function(fn) { + return this.unbind("mousewheel", fn); + } +}); + + +function handler(event) { + var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0; + event = $.event.fix(orgEvent); + event.type = "mousewheel"; + + // Old school scrollwheel delta + if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; } + if ( orgEvent.detail ) { delta = -orgEvent.detail/3; } + + // New school multidimensional scroll (touchpads) deltas + deltaY = delta; + + // Gecko + if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaY = 0; + deltaX = -1*delta; + } + + // Webkit + if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; } + if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; } + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + return ($.event.dispatch || $.event.handle).apply(this, args); +} + +})(jQuery); From 2ae81dbfb6d68371c3b3813024e3145d11f42223 Mon Sep 17 00:00:00 2001 From: Thomas W Date: Sun, 19 Aug 2012 13:46:39 -0400 Subject: [PATCH 06/23] jScrollPane implementation --- css/jquery.jscrollpane.css | 122 +++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 css/jquery.jscrollpane.css diff --git a/css/jquery.jscrollpane.css b/css/jquery.jscrollpane.css new file mode 100644 index 0000000..122cec5 --- /dev/null +++ b/css/jquery.jscrollpane.css @@ -0,0 +1,122 @@ +/* + * CSS Styles that are needed by jScrollPane for it to operate correctly. + * + * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane + * may not operate correctly without them. + */ + +.jspContainer +{ + overflow: hidden; + position: relative; +} + +.jspPane +{ + position: absolute; +} + +.jspVerticalBar +{ + position: absolute; + top: 0; + right: 0; + width: 8px; + height: 100%; + background: transparent; +} + +.jspHorizontalBar +{ + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 8px; + background: red; +} + +.jspVerticalBar *, +.jspHorizontalBar * +{ + margin: 0; + padding: 0; +} + +.jspCap +{ + display: none; +} + +.jspHorizontalBar .jspCap +{ + float: left; +} + +.jspTrack +{ + background: transparent; + position: relative; +} + +.jspDrag +{ + background: transparent; + position: relative; + top: 0; + left: 0; + cursor: pointer; + border: 1px solid white; + border-radius: 16px; +} + +.jspHorizontalBar .jspTrack, +.jspHorizontalBar .jspDrag +{ + float: left; + height: 100%; +} + +.jspArrow +{ + background: #50506d; + text-indent: -20000px; + display: block; + cursor: pointer; +} + +.jspArrow.jspDisabled +{ + cursor: default; + background: #80808d; +} + +.jspVerticalBar .jspArrow +{ + height: 8px; +} + +.jspHorizontalBar .jspArrow +{ + width: 8px; + float: left; + height: 100%; +} + +.jspVerticalBar .jspArrow:focus +{ + outline: none; +} + +.jspCorner +{ + background: #eeeef4; + float: left; + height: 100%; +} + +/* Yuk! CSS Hack for IE6 3 pixel bug :( */ +* html .jspCorner +{ + margin: 0 -3px 0 0; +} \ No newline at end of file From d9870033d4a1b010b663fbf578dca820232e60f7 Mon Sep 17 00:00:00 2001 From: Thomas W Date: Sun, 19 Aug 2012 13:55:18 -0400 Subject: [PATCH 07/23] jScrollPane implementation --- views/page.html.php | 487 ++++++++++++++++++++++---------------------- 1 file changed, 245 insertions(+), 242 deletions(-) diff --git a/views/page.html.php b/views/page.html.php index c26a2c5..160297b 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -1,242 +1,245 @@ - -page_subtype == "search") { - $v = new View("thumbs.html"); - $v->children = $content->items; - print $v; - die(0); - } - echo new View("thumbs.html"); - die(0); -} -?> -page_subtype == "photo"): - foreach (end($parents)->viewable()->children() as $i => $child) - if(!($child->is_album() || $child->is_movie())) - if($child->url() == $_SERVER['REQUEST_URI']) { -?> - -html_attributes() ?> xml:lang="en" lang="en"> - - Photo page - - - head() ?> - - Page moved here. - - - - -html_attributes() ?> xml:lang="en" lang="en"> - - - - start_combining("script,css") ?> - - <? if ($page_title): ?> - <?= $page_title ?> - <? else: ?> - <? if ($theme->item()): ?> - <?= $theme->item()->title ?> - <? elseif ($theme->tag()): ?> - <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?> - <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> - <?= item::root()->title ?> - <? endif ?> - <? endif ?> - - " - type="image/x-icon" /> - - page_type == "collection"): ?> - - - - - - - - script("json2-min.js") ?> - script("jquery-1.7.1.min.js") ?> - script("jquery.form.js") ?> - script("jquery-ui-1.8.17.custom.min.js") ?> - script("jquery.endless-scroll.js") ?> - script("jquery.getscrollbarwidth.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - - - page_subtype == "photo"): ?> - script("jquery.scrollTo.js") ?> - script("gallery.show_full_size.js") ?> - page_subtype == "movie"): ?> - script("flowplayer.js") ?> - - - head() ?> - - - script("ui.init.js") ?> - script("jquery.parsequery.js") ?> - script("imageflow.packed.js") ?> - script("jquery.mousewheel.js") ?> - script("jquery.jscrollpane.min.js") ?> - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("ui-pear-theme/jquery-ui-1.8.17.custom.css") ?> - css("screen.css") ?> - css("imageflow.packed.css") ?> - css("pear.css") ?> - css("jquery.jscrollpane.css") ?> - - - get_combined("script") ?> - - - get_combined("css") ?> - - - - - - - - body_attributes() ?>> - - page_top() ?> - site_status() ?> -page_subtype == "login") or ($theme->page_subtype == "reauthenticate")): ?> - - - -
- -item()): ?> -
item()->title, 40)) ?>   - - (item()->children()) ?>) - -
- -
- -   - - tag()): ?> - $theme->tag()->name)) ?> - - title, 40)) ?>   - - -
- -
- -
-
- -messages() ?> - - - -
-
-
-
-
-
-
- -
-
Color:
-
-
-
-
-
- -
-page_subtype != "movie"): ?> -
- Grid -
-
- Mosaic -
- -
- Slideshow -
-
- -
- - url("icons/pear_logo_sml.png"); - } ?> - - -
- - - + +page_subtype == "search") { + $v = new View("thumbs.html"); + $v->children = $content->items; + print $v; + die(0); + } + echo new View("thumbs.html"); + die(0); +} +?> +page_subtype == "photo"): + foreach (end($parents)->viewable()->children() as $i => $child) + if(!($child->is_album() || $child->is_movie())) + if($child->url() == $_SERVER['REQUEST_URI']) { +?> + +html_attributes() ?> xml:lang="en" lang="en"> + + Photo page + + + head() ?> + + Page moved here. + + + + +html_attributes() ?> xml:lang="en" lang="en"> + + + + start_combining("script,css") ?> + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <?= $theme->item()->title ?> + <? elseif ($theme->tag()): ?> + <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= item::root()->title ?> + <? endif ?> + <? endif ?> + + " + type="image/x-icon" /> + + page_type == "collection"): ?> + + + + + + + + script("json2-min.js") ?> + script("jquery-1.7.1.min.js") ?> + script("jquery.form.js") ?> + script("jquery-ui-1.8.17.custom.min.js") ?> + script("jquery.endless-scroll.js") ?> + script("jquery.getscrollbarwidth.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + + + page_subtype == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_subtype == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + script("ui.init.js") ?> + script("jquery.parsequery.js") ?> + script("imageflow.packed.js") ?> + script("jquery.mousewheel.js") ?> + script("jquery.jscrollpane.min.js") ?> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("ui-pear-theme/jquery-ui-1.8.17.custom.css") ?> + css("screen.css") ?> + css("imageflow.packed.css") ?> + css("pear.css") ?> + css("jquery.jscrollpane.css") ?> + + + get_combined("script") ?> + + + get_combined("css") ?> + + + + + + + + + body_attributes() ?>> + + page_top() ?> + site_status() ?> +page_subtype == "login") or ($theme->page_subtype == "reauthenticate")): ?> + + + +
+ +item()): ?> +
item()->title, 40)) ?>   + + (item()->children()) ?>) + +
+ +
+ +   + + tag()): ?> + $theme->tag()->name)) ?> + + title, 40)) ?>   + + +
+ +
+ +
+
+ +messages() ?> + + + +
+
+
+
+
+
+
+ +
+
Color:
+
+
+
+
+
+ +
+page_subtype != "movie"): ?> +
+ Grid +
+
+ Mosaic +
+ +
+ Slideshow +
+
+ +
+ + url("icons/pear_logo_sml.png"); + } ?> + + +
+ + + From 6f3afd2c59b0e0240b4202ddc5dfb7aa5b09f05a Mon Sep 17 00:00:00 2001 From: Thomas W Date: Sun, 19 Aug 2012 13:56:40 -0400 Subject: [PATCH 08/23] Revert "jScrollPane implementation" This reverts commit d9870033d4a1b010b663fbf578dca820232e60f7. --- views/page.html.php | 487 ++++++++++++++++++++++---------------------- 1 file changed, 242 insertions(+), 245 deletions(-) diff --git a/views/page.html.php b/views/page.html.php index 160297b..c26a2c5 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -1,245 +1,242 @@ - -page_subtype == "search") { - $v = new View("thumbs.html"); - $v->children = $content->items; - print $v; - die(0); - } - echo new View("thumbs.html"); - die(0); -} -?> -page_subtype == "photo"): - foreach (end($parents)->viewable()->children() as $i => $child) - if(!($child->is_album() || $child->is_movie())) - if($child->url() == $_SERVER['REQUEST_URI']) { -?> - -html_attributes() ?> xml:lang="en" lang="en"> - - Photo page - - - head() ?> - - Page moved here. - - - - -html_attributes() ?> xml:lang="en" lang="en"> - - - - start_combining("script,css") ?> - - <? if ($page_title): ?> - <?= $page_title ?> - <? else: ?> - <? if ($theme->item()): ?> - <?= $theme->item()->title ?> - <? elseif ($theme->tag()): ?> - <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?> - <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> - <?= item::root()->title ?> - <? endif ?> - <? endif ?> - - " - type="image/x-icon" /> - - page_type == "collection"): ?> - - - - - - - - script("json2-min.js") ?> - script("jquery-1.7.1.min.js") ?> - script("jquery.form.js") ?> - script("jquery-ui-1.8.17.custom.min.js") ?> - script("jquery.endless-scroll.js") ?> - script("jquery.getscrollbarwidth.js") ?> - script("gallery.common.js") ?> - - - script("gallery.ajax.js") ?> - script("gallery.dialog.js") ?> - script("superfish/js/superfish.js") ?> - script("jquery.localscroll.js") ?> - - - page_subtype == "photo"): ?> - script("jquery.scrollTo.js") ?> - script("gallery.show_full_size.js") ?> - page_subtype == "movie"): ?> - script("flowplayer.js") ?> - - - head() ?> - - - script("ui.init.js") ?> - script("jquery.parsequery.js") ?> - script("imageflow.packed.js") ?> - script("jquery.mousewheel.js") ?> - script("jquery.jscrollpane.min.js") ?> - css("yui/reset-fonts-grids.css") ?> - css("superfish/css/superfish.css") ?> - css("ui-pear-theme/jquery-ui-1.8.17.custom.css") ?> - css("screen.css") ?> - css("imageflow.packed.css") ?> - css("pear.css") ?> - css("jquery.jscrollpane.css") ?> - - - get_combined("script") ?> - - - get_combined("css") ?> - - - - - - - - - body_attributes() ?>> - - page_top() ?> - site_status() ?> -page_subtype == "login") or ($theme->page_subtype == "reauthenticate")): ?> - - - -
- -item()): ?> -
item()->title, 40)) ?>   - - (item()->children()) ?>) - -
- -
- -   - - tag()): ?> - $theme->tag()->name)) ?> - - title, 40)) ?>   - - -
- -
- -
-
- -messages() ?> - - - -
-
-
-
-
-
-
- -
-
Color:
-
-
-
-
-
- -
-page_subtype != "movie"): ?> -
- Grid -
-
- Mosaic -
- -
- Slideshow -
-
- -
- - url("icons/pear_logo_sml.png"); - } ?> - - -
- - - + +page_subtype == "search") { + $v = new View("thumbs.html"); + $v->children = $content->items; + print $v; + die(0); + } + echo new View("thumbs.html"); + die(0); +} +?> +page_subtype == "photo"): + foreach (end($parents)->viewable()->children() as $i => $child) + if(!($child->is_album() || $child->is_movie())) + if($child->url() == $_SERVER['REQUEST_URI']) { +?> + +html_attributes() ?> xml:lang="en" lang="en"> + + Photo page + + + head() ?> + + Page moved here. + + + + +html_attributes() ?> xml:lang="en" lang="en"> + + + + start_combining("script,css") ?> + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <?= $theme->item()->title ?> + <? elseif ($theme->tag()): ?> + <?= t("Photos tagged with %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= item::root()->title ?> + <? endif ?> + <? endif ?> + + " + type="image/x-icon" /> + + page_type == "collection"): ?> + + + + + + + + script("json2-min.js") ?> + script("jquery-1.7.1.min.js") ?> + script("jquery.form.js") ?> + script("jquery-ui-1.8.17.custom.min.js") ?> + script("jquery.endless-scroll.js") ?> + script("jquery.getscrollbarwidth.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + + + page_subtype == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_subtype == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + script("ui.init.js") ?> + script("jquery.parsequery.js") ?> + script("imageflow.packed.js") ?> + script("jquery.mousewheel.js") ?> + script("jquery.jscrollpane.min.js") ?> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("ui-pear-theme/jquery-ui-1.8.17.custom.css") ?> + css("screen.css") ?> + css("imageflow.packed.css") ?> + css("pear.css") ?> + css("jquery.jscrollpane.css") ?> + + + get_combined("script") ?> + + + get_combined("css") ?> + + + + + + + + body_attributes() ?>> + + page_top() ?> + site_status() ?> +page_subtype == "login") or ($theme->page_subtype == "reauthenticate")): ?> + + + +
+ +item()): ?> +
item()->title, 40)) ?>   + + (item()->children()) ?>) + +
+ +
+ +   + + tag()): ?> + $theme->tag()->name)) ?> + + title, 40)) ?>   + + +
+ +
+ +
+
+ +messages() ?> + + + +
+
+
+
+
+
+
+ +
+
Color:
+
+
+
+
+
+ +
+page_subtype != "movie"): ?> +
+ Grid +
+
+ Mosaic +
+ +
+ Slideshow +
+
+ +
+ + url("icons/pear_logo_sml.png"); + } ?> + + +
+ + + From 9e5e1b3c03fc4863cb1269aa51d3546d04947d80 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 14:57:29 -0300 Subject: [PATCH 09/23] Update views/page.html.php --- views/page.html.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/views/page.html.php b/views/page.html.php index c26a2c5..24f2cdd 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -132,6 +132,9 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); + body_attributes() ?>> From f9ab5247de416c3863c09a35b95025c4936bf9b3 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 16:30:58 -0300 Subject: [PATCH 10/23] replace EndlessScroll functionality --- js/pear.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/pear.js b/js/pear.js index 7773373..1453c03 100644 --- a/js/pear.js +++ b/js/pear.js @@ -128,7 +128,7 @@ function loadMore() { var url = navigation.next; navigation.next = ''; $.get(url,{ ajax: '1'},function (data) { - $('#gridContainer').append(data); + $('.jspPane').append(data); thumbLoad(); }); return true; @@ -609,8 +609,9 @@ function pearInit(options) { setKeys(); setTimeout(thumbLoad, 1); - $('#gridContainer').endlessScroll({ fireOnce: true, bottomPixels: 200, callback: function(p) { loadMore(); } }); - $('#gridContainer').trigger('scroll'); + $('#gridContainer').bind('jsp-scroll-y',function(event, scrollPositionY, isAtTop, isAtBottom) { + if(isAtBottom) {loadMore();} + }); $('#mosaicDetailContainer').hover(function () { $(this).addClass("g-photo hovering"); From a6e79d5b62e7b11cc730381fe5d7b7604869d0ec Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 16:32:13 -0300 Subject: [PATCH 11/23] remove endlessscroll --- views/page.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/views/page.html.php b/views/page.html.php index 24f2cdd..5bfe7a4 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -73,7 +73,6 @@ script("jquery-1.7.1.min.js") ?> script("jquery.form.js") ?> script("jquery-ui-1.8.17.custom.min.js") ?> - script("jquery.endless-scroll.js") ?> script("jquery.getscrollbarwidth.js") ?> script("gallery.common.js") ?> From 1f31b4600e74211472305dfb06848408719020c2 Mon Sep 17 00:00:00 2001 From: Thomas W Date: Sun, 19 Aug 2012 15:33:03 -0400 Subject: [PATCH 12/23] remove endlessscroll --- js/jquery.endless-scroll.js | 126 ------------------------------------ 1 file changed, 126 deletions(-) delete mode 100644 js/jquery.endless-scroll.js diff --git a/js/jquery.endless-scroll.js b/js/jquery.endless-scroll.js deleted file mode 100644 index 9dd57ff..0000000 --- a/js/jquery.endless-scroll.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * Endless Scroll plugin for jQuery - * - * v1.4.8 - * - * Copyright (c) 2008 Fred Wu - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ - -/** - * Usage: - * - * // using default options - * $(document).endlessScroll(); - * - * // using some custom options - * $(document).endlessScroll({ - * fireOnce: false, - * fireDelay: false, - * loader: "
", - * callback: function(){ - * alert("test"); - * } - * }); - * - * Configuration options: - * - * bottomPixels integer the number of pixels from the bottom of the page that triggers the event - * fireOnce boolean only fire once until the execution of the current event is completed - * fireDelay integer delay the subsequent firing, in milliseconds, 0 or false to disable delay - * loader string the HTML to be displayed during loading - * data string|function plain HTML data, can be either a string or a function that returns a string, - * when passed as a function it accepts one argument: fire sequence (the number - * of times the event triggered during the current page session) - * insertAfter string jQuery selector syntax: where to put the loader as well as the plain HTML data - * callback function callback function, accepts one argument: fire sequence (the number of times - * the event triggered during the current page session) - * resetCounter function resets the fire sequence counter if the function returns true, this function - * could also perform hook actions since it is applied at the start of the event - * ceaseFire function stops the event (no more endless scrolling) if the function returns true - * - * Usage tips: - * - * The plugin is more useful when used with the callback function, which can then make AJAX calls to retrieve content. - * The fire sequence argument (for the callback function) is useful for 'pagination'-like features. - */ - -(function($){ - - $.fn.endlessScroll = function(options) { - - var defaults = { - bottomPixels: 50, - fireOnce: true, - fireDelay: 150, - loader: "
Loading...
", - data: "", - insertAfter: "div:last", - resetCounter: function() { return false; }, - callback: function() { return true; }, - ceaseFire: function() { return false; } - }; - - var options = $.extend({}, defaults, options); - - var firing = true; - var fired = false; - var fireSequence = 0; - - if (options.ceaseFire.apply(this) === true) { - firing = false; - } - - if (firing === true) { - $(this).scroll(function() { - if (options.ceaseFire.apply(this) === true) { - firing = false; - return; // Scroll will still get called, but nothing will happen - } - - if (this == document || this == window) { - var is_scrollable = $(document).height() - $(window).height() <= $(window).scrollTop() + options.bottomPixels; - } else { - var is_scrollable = ($(this)[0].scrollHeight - $(this).height() <= $(this).scrollTop() + options.bottomPixels); - } - - if (is_scrollable && (options.fireOnce == false || (options.fireOnce == true && fired != true))) { - if (options.resetCounter.apply(this) === true) fireSequence = 0; - - fired = true; - fireSequence++; - - $(options.insertAfter).after("
" + options.loader + "
"); - - data = typeof options.data == 'function' ? options.data.apply(this, [fireSequence]) : options.data; - - if (data !== false) { - $(options.insertAfter).after("
" + data + "
"); - $("div#endless_scroll_data").hide().fadeIn(); - $("div#endless_scroll_data").removeAttr("id"); - - options.callback.apply(this, [fireSequence]); - - if (options.fireDelay !== false || options.fireDelay !== 0) { - $("body").after("
"); - // slight delay for preventing event firing twice - $("div#endless_scroll_marker").fadeTo(options.fireDelay, 1, function() { - $(this).remove(); - fired = false; - }); - } - else { - fired = false; - } - } - - $("div#endless_scroll_loader").remove(); - } - }); - } - }; - -})(jQuery); From f4fa8f32b73716b2ee4d189fed2569d3d6d3e714 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 17:06:28 -0300 Subject: [PATCH 13/23] Update js/pear.js --- js/pear.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/js/pear.js b/js/pear.js index 1453c03..b7d4a66 100644 --- a/js/pear.js +++ b/js/pear.js @@ -609,9 +609,6 @@ function pearInit(options) { setKeys(); setTimeout(thumbLoad, 1); - $('#gridContainer').bind('jsp-scroll-y',function(event, scrollPositionY, isAtTop, isAtBottom) { - if(isAtBottom) {loadMore();} - }); $('#mosaicDetailContainer').hover(function () { $(this).addClass("g-photo hovering"); From 7f30389367dc6c879fc3d3434f20519313a8095c Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 17:07:06 -0300 Subject: [PATCH 14/23] Update views/page.html.php --- views/page.html.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/views/page.html.php b/views/page.html.php index 5bfe7a4..d0c3b82 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -131,8 +131,13 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - From 068c15f372033a546ed7c4a2b6c0194a4d535a84 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 22:59:18 -0300 Subject: [PATCH 15/23] move JS code to pear.js --- views/page.html.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/views/page.html.php b/views/page.html.php index d0c3b82..4591b1a 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -131,14 +131,6 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - body_attributes() ?>> From 55b4855d4a3a5be09fdd4ed7c91b3ce4dcf6317d Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 23:01:01 -0300 Subject: [PATCH 16/23] move JS code to pear.js also, fix content display issue for small thumbs / lots of available space --- js/pear.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/pear.js b/js/pear.js index b7d4a66..7ff3b9c 100644 --- a/js/pear.js +++ b/js/pear.js @@ -609,6 +609,15 @@ function pearInit(options) { setKeys(); setTimeout(thumbLoad, 1); + $(function(){ + var scrollapi = $('#gridContainer').jScrollPane({autoReinitialise: true}).data('jsp'); + $('#gridContainer').bind('jsp-scroll-y',function(event, scrollPositionY, isAtTop, isAtBottom) { + if($('#gridContainer').outerHeight() + scrollPositionY >= scrollapi.getContentHeight() - 200) {loadMore();} + }); + $('#gridContainer').bind('jsp-initialised',function(event, isScrollable) { + if(!isScrollable) {loadMore();} + }); + }); $('#mosaicDetailContainer').hover(function () { $(this).addClass("g-photo hovering"); From 5d9dd3a4792a8556526ba655710e08e7cb95b246 Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Sun, 19 Aug 2012 23:02:36 -0300 Subject: [PATCH 17/23] change style to accomodate white theme --- css/jquery.jscrollpane.css | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/css/jquery.jscrollpane.css b/css/jquery.jscrollpane.css index 122cec5..b51ab3d 100644 --- a/css/jquery.jscrollpane.css +++ b/css/jquery.jscrollpane.css @@ -33,7 +33,7 @@ left: 0; width: 100%; height: 8px; - background: red; + background: transparent; } .jspVerticalBar *, @@ -61,12 +61,11 @@ .jspDrag { - background: transparent; + background: gray; position: relative; top: 0; left: 0; cursor: pointer; - border: 1px solid white; border-radius: 16px; } From 93f0bb5f71fce454423c702d3be8d834f60963dc Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Mon, 20 Aug 2012 17:20:41 -0300 Subject: [PATCH 18/23] getScrollBarWidth is now obsolete --- js/pear.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pear.js b/js/pear.js index 7ff3b9c..427e079 100644 --- a/js/pear.js +++ b/js/pear.js @@ -16,7 +16,7 @@ function thumbPadding() { var size, width, margin; /* Padding on thumbs to make them flow nicer */ size = Math.ceil((pear.currentView === 'mosaic') ? $('#imgSlider').slider('value') / 2 : $('#imgSlider').slider('value')) + 10; - width = $('#gridContainer').width() - $.getScrollbarWidth() - 8; + width = $('#gridContainer').width() - 16; margin = width / Math.floor(width / size) - size; $('.gallery-thumb').css({'margin-left': Math.ceil(margin / 2) + 'px', 'margin-right': Math.floor(margin / 2) + 'px'}); } From 90e732b47114346b338ccb4ecf1ccae6268002df Mon Sep 17 00:00:00 2001 From: oneoftwo Date: Mon, 20 Aug 2012 17:22:00 -0300 Subject: [PATCH 19/23] getScrollBarWidth is now obsolete --- views/page.html.php | 1 - 1 file changed, 1 deletion(-) diff --git a/views/page.html.php b/views/page.html.php index 4591b1a..be742cb 100644 --- a/views/page.html.php +++ b/views/page.html.php @@ -73,7 +73,6 @@ script("jquery-1.7.1.min.js") ?> script("jquery.form.js") ?> script("jquery-ui-1.8.17.custom.min.js") ?> - script("jquery.getscrollbarwidth.js") ?> script("gallery.common.js") ?>