slimbox2-rails 2.05.1 → 2.05.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50c2de83c46e5a47fb7ea4ec4ba4c855554a7c59
4
- data.tar.gz: 2d5b65b5f62cb5461708f62afec2c7e4d5d73c92
3
+ metadata.gz: 35245dadb0e63550713f5fdcc29bd7a2a84a3650
4
+ data.tar.gz: 6d7c573af6b39025e1b48ae739704f0b5ac81885
5
5
  SHA512:
6
- metadata.gz: 4acb5bb5461ce1fff90d4e1bd58db73c5b39969f647e95173d372d0899855267c3eb8646e6fdbba0b3c2c1ec0c8b7d564964fb15662793bfccc7c00cc3085aa8
7
- data.tar.gz: 7bb18783c4800884f912da5f0b0c9411b9cf879b3a0f6b1ad2781fe6a446da584f633a20cb7bd629ed08d13adbfbbc459122a0ea8d3ba0a7c8843416dc5234c6
6
+ metadata.gz: 3e95c63e7f666937d99be39ae5c8b975602ccc668f84b53f7f81e3c30feca748f339ef67ab1bb7f345026b48ea17688e6d9a13877e5953c1a0dcecd672e2ab6d
7
+ data.tar.gz: 760f9ccff5fb58ac6d29c90c119d496c8ccef2f426cba6a3c288a64564c3fa944c31bf69fdee0f324f3502ab368b3fa0c750a75d079ad2937ce3132ecbeb0904
data/README.md CHANGED
@@ -37,7 +37,7 @@ Or install it yourself as:
37
37
  To require Slimbox2 UI modules, add the following to your application.js:
38
38
 
39
39
  ```
40
- //= require slimbox2
40
+ //= require slimbox2.min
41
41
  ```
42
42
 
43
43
  Also add the Superfish UI CSS to your application.css:
@@ -1,5 +1,5 @@
1
1
  module Slimbox2
2
2
  module Rails
3
- VERSION = "2.05.1"
3
+ VERSION = "2.05.2"
4
4
  end
5
5
  end
@@ -2,6 +2,7 @@
2
2
  Slimbox v2.05 - The ultimate lightweight Lightbox clone for jQuery
3
3
  (c) 2007-2013 Christophe Beyls <http://www.digitalia.be>
4
4
  MIT-style license.
5
+ Modified to image auto-resized by RORLab (2013.8.26)
5
6
  */
6
7
 
7
8
  (function($) {
@@ -53,7 +54,7 @@
53
54
  // Open Slimbox with the specified parameters
54
55
  $.slimbox = function(_images, startImage, _options) {
55
56
  options = $.extend({
56
- scaler: .8,
57
+ scaler: .8, // added by rorlab
57
58
  loop: false, // Allows to navigate between first and last images
58
59
  overlayOpacity: 0.8, // 1 is opaque, 0 is completely transparent (change the color in the CSS file)
59
60
  overlayFadeDuration: 400, // Duration of the overlay fade-in and fade-out animations (in milliseconds)
@@ -197,7 +198,9 @@
197
198
  preload.width *= c; //added
198
199
  preload.height *= c; //added
199
200
  }
200
- $(image).css({backgroundImage: "url(" + activeURL + ")", visibility: "hidden", display: ""});
201
+ // added 'backgroundSize: preload.width,' into $(image).css by rorlab
202
+ $(image).css({backgroundSize: preload.width, backgroundImage: "url(" + activeURL + ")", visibility: "hidden", display: ""});
203
+
201
204
  $(sizer).width(preload.width);
202
205
  $([sizer, prevLink, nextLink]).height(preload.height);
203
206
 
@@ -2,8 +2,9 @@
2
2
  Slimbox v2.05 - The ultimate lightweight Lightbox clone for jQuery
3
3
  (c) 2007-2013 Christophe Beyls <http://www.digitalia.be>
4
4
  MIT-style license.
5
+ Modified to image auto-resized by RORLab (2013.8.26)
5
6
  */
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
+ (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({backgroundSize:v.width,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
8
 
8
9
  // AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
9
10
  if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimbox2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.05.1
4
+ version: 2.05.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hyoseong Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties