slimbox2-rails 2.05.0 → 2.05.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 50c2de83c46e5a47fb7ea4ec4ba4c855554a7c59
         | 
| 4 | 
            +
              data.tar.gz: 2d5b65b5f62cb5461708f62afec2c7e4d5d73c92
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4acb5bb5461ce1fff90d4e1bd58db73c5b39969f647e95173d372d0899855267c3eb8646e6fdbba0b3c2c1ec0c8b7d564964fb15662793bfccc7c00cc3085aa8
         | 
| 7 | 
            +
              data.tar.gz: 7bb18783c4800884f912da5f0b0c9411b9cf879b3a0f6b1ad2781fe6a446da584f633a20cb7bd629ed08d13adbfbbc459122a0ea8d3ba0a7c8843416dc5234c6
         | 
    
        data/README.md
    CHANGED
    
    
| @@ -53,6 +53,7 @@ | |
| 53 53 | 
             
            	// Open Slimbox with the specified parameters
         | 
| 54 54 | 
             
            	$.slimbox = function(_images, startImage, _options) {
         | 
| 55 55 | 
             
            		options = $.extend({
         | 
| 56 | 
            +
            			scaler: .8,
         | 
| 56 57 | 
             
            			loop: false,				// Allows to navigate between first and last images
         | 
| 57 58 | 
             
            			overlayOpacity: 0.8,			// 1 is opaque, 0 is completely transparent (change the color in the CSS file)
         | 
| 58 59 | 
             
            			overlayFadeDuration: 400,		// Duration of the overlay fade-in and fade-out animations (in milliseconds)
         | 
| @@ -189,7 +190,13 @@ | |
| 189 190 | 
             
            	}
         | 
| 190 191 |  | 
| 191 192 | 
             
            	function animateBox() {
         | 
| 193 | 
            +
            		var maxwidth = 800;  //added by rorlab
         | 
| 192 194 | 
             
            		center.className = "";
         | 
| 195 | 
            +
            		if(preload.width > maxwidth) {  // if-condition added by rorlab
         | 
| 196 | 
            +
            			var c = options.scaler * Math.min($(window).width() / preload.width, $(window).height() / preload.height); //added
         | 
| 197 | 
            +
            			preload.width  *= c; //added
         | 
| 198 | 
            +
            			preload.height *= c; //added
         | 
| 199 | 
            +
            		}
         | 
| 193 200 | 
             
            		$(image).css({backgroundImage: "url(" + activeURL + ")", visibility: "hidden", display: ""});
         | 
| 194 201 | 
             
            		$(sizer).width(preload.width);
         | 
| 195 202 | 
             
            		$([sizer, prevLink, nextLink]).height(preload.height);
         | 
| @@ -240,4 +247,13 @@ | |
| 240 247 | 
             
            		return false;
         | 
| 241 248 | 
             
            	}
         | 
| 242 249 |  | 
| 243 | 
            -
            })(jQuery);
         | 
| 250 | 
            +
            })(jQuery);
         | 
| 251 | 
            +
             | 
| 252 | 
            +
            // AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
         | 
| 253 | 
            +
            if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
         | 
| 254 | 
            +
            	jQuery(function($) {
         | 
| 255 | 
            +
            		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
         | 
| 256 | 
            +
            			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
         | 
| 257 | 
            +
            		});
         | 
| 258 | 
            +
            	});
         | 
| 259 | 
            +
            }
         | 
| @@ -3,7 +3,7 @@ | |
| 3 3 | 
             
            	(c) 2007-2013 Christophe Beyls <http://www.digitalia.be>
         | 
| 4 4 | 
             
            	MIT-style license.
         | 
| 5 5 | 
             
            */
         | 
| 6 | 
            -
            (function( | 
| 6 | 
            +
            (function(e){function L(){var n=t.scrollLeft(),r=t.width();e([b,T]).css("left",n+r/2);if(a)e(y).css({left:n,top:t.scrollTop(),width:r,height:t.height()})}function A(n){if(n){e("object").add(h?"select":"embed").each(function(e,t){p[e]=[t,t.style.visibility];t.style.visibility="hidden"})}else{e.each(p,function(e,t){t[0].style.visibility=t[1]});p=[]}var r=n?"bind":"unbind";t[r]("scroll resize",L);e(document)[r]("keydown",O)}function O(t){var r=t.which,i=e.inArray;return i(r,n.closeKeys)>=0?j():i(r,n.nextKeys)>=0?_():i(r,n.previousKeys)>=0?M():null}function M(){return D(o)}function _(){return D(u)}function D(e){if(e>=0){i=e;s=r[i][0];o=(i||(n.loop?r.length:0))-1;u=(i+1)%r.length||(n.loop?0:-1);B();b.className="lbLoading";v=new Image;v.onload=P;v.src=s}return false}function P(){var t=800;b.className="";if(v.width>t){var a=n.scaler*Math.min(e(window).width()/v.width,e(window).height()/v.height);v.width*=a;v.height*=a}e(w).css({backgroundImage:"url("+s+")",visibility:"hidden",display:""});e(E).width(v.width);e([E,S,x]).height(v.height);e(C).html(r[i][1]||"");e(k).html((r.length>1&&n.counterText||"").replace(/{x}/,i+1).replace(/{y}/,r.length));if(o>=0)m.src=r[o][0];if(u>=0)g.src=r[u][0];l=w.offsetWidth;c=w.offsetHeight;var h=Math.max(0,f-c/2);if(b.offsetHeight!=c){e(b).animate({height:c,top:h},n.resizeDuration,n.resizeEasing)}if(b.offsetWidth!=l){e(b).animate({width:l,marginLeft:-l/2},n.resizeDuration,n.resizeEasing)}e(b).queue(function(){e(T).css({width:l,top:h+c,marginLeft:-l/2,visibility:"hidden",display:""});e(w).css({display:"none",visibility:"",opacity:""}).fadeIn(n.imageFadeDuration,H)})}function H(){if(o>=0)e(S).show();if(u>=0)e(x).show();e(N).css("marginTop",-N.offsetHeight).animate({marginTop:0},n.captionAnimationDuration);T.style.visibility=""}function B(){v.onload=null;v.src=m.src=g.src=s;e([b,w,N]).stop(true);e([S,x,w,T]).hide()}function j(){if(i>=0){B();i=o=u=-1;e(b).hide();e(y).stop().fadeOut(n.overlayFadeDuration,A)}return false}var t=e(window),n,r,i=-1,s,o,u,a,f,l,c,h=!window.XMLHttpRequest,p=[],d=document.documentElement,v={},m=new Image,g=new Image,y,b,w,E,S,x,T,N,C,k;e(function(){e("body").append(e([y=e('<div id="lbOverlay" />').click(j)[0],b=e('<div id="lbCenter" />')[0],T=e('<div id="lbBottomContainer" />')[0]]).css("display","none"));w=e('<div id="lbImage" />').appendTo(b).append(E=e('<div style="position: relative;" />').append([S=e('<a id="lbPrevLink" href="#" />').click(M)[0],x=e('<a id="lbNextLink" href="#" />').click(_)[0]])[0])[0];N=e('<div id="lbBottom" />').appendTo(T).append([e('<a id="lbCloseLink" href="#" />').click(j)[0],C=e('<div id="lbCaption" />')[0],k=e('<div id="lbNumber" />')[0],e('<div style="clear: both;" />')[0]])[0]});e.slimbox=function(i,s,o){n=e.extend({scaler:.8,loop:false,overlayOpacity:.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},o);if(typeof i=="string"){i=[[i,s]];s=0}f=t.scrollTop()+t.height()/2;l=n.initialWidth;c=n.initialHeight;e(b).css({top:Math.max(0,f-c/2),width:l,height:c,marginLeft:-l/2}).show();a=h||y.currentStyle&&y.currentStyle.position!="fixed";if(a)y.style.position="absolute";e(y).css("opacity",n.overlayOpacity).fadeIn(n.overlayFadeDuration);L();A(1);r=i;n.loop=n.loop&&r.length>1;return D(s)};e.fn.slimbox=function(t,n,r){n=n||function(e){return[e.href,e.title]};r=r||function(){return true};var i=this;return i.unbind("click").click(function(){var s=this,o=0,u,a=0,f;u=e.grep(i,function(e,t){return r.call(s,e,t)});for(f=u.length;a<f;++a){if(u[a]==s)o=a;u[a]=n(u[a],a)}return e.slimbox(u,o,t)})}})(jQuery)
         | 
| 7 7 |  | 
| 8 8 | 
             
            // AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
         | 
| 9 9 | 
             
            if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
         | 
| @@ -31,14 +31,14 @@ | |
| 31 31 | 
             
            }
         | 
| 32 32 |  | 
| 33 33 | 
             
            /* override style to limit the size of image to 640x480 in the lightbox  */
         | 
| 34 | 
            -
             | 
| 34 | 
            +
            /*#lbImage {
         | 
| 35 35 | 
             
              width:640px;
         | 
| 36 36 | 
             
              height:480px;
         | 
| 37 37 | 
             
              background-repeat: no-repeat;
         | 
| 38 38 | 
             
              background-position:center;
         | 
| 39 39 | 
             
              background-size: cover;
         | 
| 40 40 | 
             
              -moz-background-size: cover;
         | 
| 41 | 
            -
            }
         | 
| 41 | 
            +
            }*/
         | 
| 42 42 |  | 
| 43 43 | 
             
            #lbPrevLink, #lbNextLink {
         | 
| 44 44 | 
             
            	display: block;
         |