slimbox2-rails 2.04.2 → 2.04.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/slimbox2/rails/version.rb +1 -1
- data/vendor/assets/javascripts/slimbox2.js +1 -1
- data/vendor/assets/stylesheets/slimbox2.css.erb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d529408d317cd4f56094e618f9406a7664e2236d
|
4
|
+
data.tar.gz: 2b748ec2efc9e7ca8947472b01e543c60955a394
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea83ef26d68e1add597b4e3b03e29a6d311fa2b02777127f389f87adca4d364c6a61867d920d2de3b71b52f068878b8bc9e875bafde52178291117da04ed41b3
|
7
|
+
data.tar.gz: 3edab6f0198e7d2fbc5d991d3d87e75cd7a5928cd2c876a1a20525726fc5951ba91dc20470247619a4fe3a2d9ca6cb3fd6ad531f49b9c13a2e89475303ad8fc6
|
data/README.md
CHANGED
@@ -4,6 +4,12 @@ Gemify Slimbox2 to use with Rails 3.1 asset pipeline.
|
|
4
4
|
|
5
5
|
If you want to see the more information about Slimbox2, click [here](http://www.digitalia.be/software/slimbox2).
|
6
6
|
|
7
|
+
|
8
|
+
With the help of [Example 9](http://www.trips.elusien.co.uk/slimbox2/example9.html) on [Neil’s Slimbox Examples](http://www.trips.elusien.co.uk/slimbox2/), Travis Hydzik has managed to hack together this feature which we are happy about.(v2.04.3)
|
9
|
+
|
10
|
+
- [Modified Slimbox2 with auto resize JavaScript](http://thydzik.com/downloads/slimbox2-autosize.js)
|
11
|
+
- [Modified Slimbox2 with auto resize CSS](http://thydzik.com/downloads/slimbox2-autosize.css)
|
12
|
+
|
7
13
|
## Versioning
|
8
14
|
|
9
15
|
slimbox2-rails v2.04.x was built with Slimbox v2.04
|
@@ -3,7 +3,7 @@
|
|
3
3
|
(c) 2007-2010 Christophe Beyls <http://www.digitalia.be>
|
4
4
|
MIT-style license.
|
5
5
|
*/
|
6
|
-
(function(
|
6
|
+
(function(e){function _(){var n=t.scrollLeft(),r=t.width();e([S,L]).css("left",n+r/2);if(a){e(E).css({left:n,top:t.scrollTop(),width:r,height:t.height()})}}function D(n){if(n){e("object").add(v?"select":"embed").each(function(e,t){m[e]=[t,t.style.visibility];t.style.visibility="hidden"})}else{e.each(m,function(e,t){t[0].style.visibility=t[1]});m=[]}var r=n?"bind":"unbind";t[r]("scroll resize",_);e(document)[r]("keydown",P)}function P(t){var r=t.keyCode,i=e.inArray;return i(r,n.closeKeys)>=0?R():i(r,n.nextKeys)>=0?B():i(r,n.previousKeys)>=0?H():false}function H(){return j(o)}function B(){return j(u)}function j(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);q();S.className="lbLoading";y=new Image;y.onload=F;y.src=s}return false}function F(){S.className="";var t=n.scaler*Math.min(e(window).width()/y.width,e(window).height()/y.height);y.width*=t;y.height*=t;e(T).attr({src:s});e(x).css({visibility:"hidden",display:""});e(N).width(y.width);e([N,C,k]).height(y.height);e(O).html(r[i][1]||"");e(M).html((r.length>1&&n.counterText||"").replace(/{x}/,i+1).replace(/{y}/,r.length));if(o>=0){b.src=r[o][0]}if(u>=0){w.src=r[u][0]}l=x.offsetWidth;c=x.offsetHeight;var a=Math.max(0,f-c/2);if(S.offsetHeight!==c){e(S).animate({height:c,top:a},n.resizeDuration,n.resizeEasing)}if(S.offsetWidth!==l){e(S).animate({width:l,marginLeft:-l/2},n.resizeDuration,n.resizeEasing)}e(S).queue(function(){e(L).css({width:l,top:a+c,marginLeft:-l/2,visibility:"hidden",display:""});e(x).css({display:"none",visibility:"",opacity:""}).fadeIn(n.imageFadeDuration,I)})}function I(){if(o>=0){e(C).show()}if(u>=0){e(k).show()}e(A).css("marginTop",-A.offsetHeight).animate({marginTop:0},n.captionAnimationDuration);L.style.visibility=""}function q(){y.onload=null;y.src=b.src=w.src=s;e([S,x,A]).stop(true);e([C,k,x,L]).hide()}function R(){if(i>=0){q();i=o=u=-1;e(S).hide();e(E).stop().fadeOut(n.overlayFadeDuration,D)}return false}var t=e(window),n,r,i=-1,s,o,u,a,f,l,c,h,p,d,v=!window.XMLHttpRequest,m=[],g=document.documentElement,y={},b=new Image,w=new Image,E,S,x,T,N,C,k,L,A,O,M;e(function(){e("body").append(e([E=e('<div id="lbOverlay" />')[0],S=e('<div id="lbCenter" />')[0],L=e('<div id="lbBottomContainer" />')[0]]).css("display","none"));x=e('<div id="lbImage" />').appendTo(S).append(N=e('<div style="position: relative;" />').append([T=e('<img id="lbSlide" src="white.gif" alt="" />')[0],k=e('<a id="lbNextLink" href="#" />').text(".").click(B)[0],C=e('<a id="lbPrevLink" href="#" />').text(".").click(H)[0]])[0])[0];window.nextlink=document.getElementById("lbNextLink");A=e('<div id="lbBottom" />').appendTo(L).append([e('<a id="lbCloseLink" href="#" />').add(E).click(R)[0],O=e('<div id="lbCaption" />')[0],M=e('<div id="lbNumber" />')[0],e('<div style="clear: both;" />')[0]])[0]});e.slimbox=function(i,s,o){n=e.extend({loop:false,overlayOpacity:.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,slideInterval:0,scaler:.75,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;h=n.slideInterval;e(S).css({top:Math.max(0,f-c/2),width:l,height:c,marginLeft:-l/2}).show();a=v||E.currentStyle&&E.currentStyle.position!=="fixed";if(a){E.style.position="absolute"}e(E).css("opacity",n.overlayOpacity).fadeIn(n.overlayFadeDuration);_();D(1);r=i;n.loop=n.loop&&r.length>1;if(h>0){p=setInterval(function(){B()},1e3*h)}else{clearInterval(p)}return j(s)};e.fn.slimbox=function(t,r,i){r=r||function(e){return[e.href,e.title]};i=i||function(){return true};var s=this;n=e.extend({slideInterval:0},t);h=n.slideInterval;return s.unbind("click").click(function(){var n=this,o=0,u,a=0,f;u=e.grep(s,function(e,t){return i.call(n,e,t)});for(f=u.length;a<f;++a){if(u[a]===n){o=a}u[a]=r(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)) {
|
@@ -30,12 +30,21 @@
|
|
30
30
|
background-repeat: no-repeat;
|
31
31
|
}
|
32
32
|
|
33
|
+
#lbSlide{
|
34
|
+
display: block;
|
35
|
+
position: absolute;
|
36
|
+
width: 100%;
|
37
|
+
}
|
38
|
+
|
33
39
|
#lbPrevLink, #lbNextLink {
|
34
40
|
display: block;
|
35
41
|
position: absolute;
|
36
42
|
top: 0;
|
37
43
|
width: 50%;
|
38
44
|
outline: none;
|
45
|
+
font-size: 100000px; /* Workaround needed for IE */
|
46
|
+
overflow: hidden; /* Workaround needed for IE */
|
47
|
+
color: #666;
|
39
48
|
}
|
40
49
|
|
41
50
|
#lbPrevLink {
|
@@ -47,6 +56,7 @@
|
|
47
56
|
}
|
48
57
|
|
49
58
|
#lbNextLink {
|
59
|
+
width: 100%;
|
50
60
|
right: 0;
|
51
61
|
}
|
52
62
|
|
@@ -80,4 +90,4 @@
|
|
80
90
|
|
81
91
|
#lbCaption {
|
82
92
|
font-weight: bold;
|
83
|
-
}
|
93
|
+
}
|
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.04.
|
4
|
+
version: 2.04.3
|
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-03-
|
11
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|