Commit 84a2fb1d by christian

add .gitignore

parent af648192
*/.idea/
**/.idea/workspace.xml
**/.idea/tasks.xml
\ No newline at end of file
imagebox-plugin
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectResources">
<resource url="http://schemas.microsoft.com/BizTalk/2003" location="" />
</component>
<component name="ProjectRootManager" version="2" />
<component name="SvnConfiguration">
<configuration>$USER_HOME$/.subversion</configuration>
</component>
<component name="masterDetails">
<states>
<state key="ScopeChooserConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/imagebox-plugin.iml" filepath="$PROJECT_DIR$/.idea/imagebox-plugin.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -5,20 +5,22 @@
MIT-style license.
*/
(function ($, window, document, Math, undefined) {
"use strict";
'use strict';
var ver = '0.1.4';
$('head').append(' <link rel="stylesheet" href="ImageBox/css/slimbox.css" type="text/css" media="all">');
$('head').append(' <link rel="stylesheet" href="./css/slimbox.css" type="text/css" media="all">');
//Feature tests
if (!$.cssHooks)
if (!$.cssHooks) {
throw (new Error('jQuery 1.4.3+ is needed for this plugin to work'));
}
function doStyle(prop) {
var vP, sP, cP = prop.charAt(0).toUpperCase() + prop.slice(1),
prefix = ['Moz', 'Webkit', 'O', 'ms'], div = document.createElement('div');
if (prop in div.style)
if (prop in div.style) {
sP = prop;
}
else {
for (var i = 0; i < prefix.length; i++) {
vP = prefix[i] + cP;
......@@ -66,8 +68,9 @@
var $el = $cont.children();
var elArr = $el.get();
if ($cont.css('position') == 'static')
if ($cont.css('position') == 'static') {
$cont.css('position', 'relative');
}
//extend config
var opts = $.extend({}, $.fn.imagebox.defaults, options || {});
......@@ -96,10 +99,13 @@
nLeft = parseInt(opts.width) * nX;
nTop = parseInt(opts.height) * nY;
if (nX < maxRowLen - n)
nX++
else
nX = 0, nY += 1;
if (nX < maxRowLen - n) {
nX++;
}
else {
nX = 0;
nY += 1;
}
$(elArr[i]).css('display', 'block');
elId = 'imageBox-' + (i);
......@@ -129,15 +135,15 @@
height: opts.height
});
if (opts.slimbox)
if (opts.slimbox) {
$(this).attr('rel', 'imageBox-' + iBgallery + '');
}
});
$imageBoxContainer.css({
paddingTop: parseInt($imageBox.height() / 2),
paddingBottom: parseInt($imageBox.height() / 2)
})
});
$cont.css({
width: parseInt($imageBox.width() * maxRowLen),
......@@ -163,14 +169,16 @@
});
if (jQuery().slimbox) {
console.log("M'KAY")
if (opts.slimbox)
console.info('KAY');
if (opts.slimbox) {
$.fn.imagebox.slimbox(opts.slimOptions);
}
}
else {
console.error('TROUBLE!!!');
}
else
console.log('TROUBLE!!!');
});
}
};
$.fn.imagebox.ver = function () { return ver; };
......@@ -200,7 +208,7 @@
nextKeys: [39, 78]
},
iBgallery: ''
}
};
$.fn.imagebox.slimbox = function (obj) {
var obj = obj || {};
......
/*
jQuery ImageBox - Crazy image gallery with included Slimbox
Version: 0.1.4
(c) 2014 Christian Weiss <http://monkeybiz.at>
MIT-style license.
*/
(function(a,H,C,n,I){function v(c){var d,g,f=c.charAt(0).toUpperCase()+c.slice(1),b=["Moz","Webkit","O","ms"],e=C.createElement("div");if(c in e.style)g=c;else for(var h=0;h<b.length;h++)if(d=b[h]+f,d in e.style){g=d;break}return a.support[c]=g}a("head").append(' <link rel="stylesheet" href="ImageBox/css/slimbox.css" type="text/css" media="all">');if(!a.cssHooks)throw Error("jQuery 1.4.3+ is needed for this plugin to work");var p=v("transform");p&&"transform"!==p&&(a.cssHooks.transform={get:function(c,
d,g){return a.css(c,p)},set:function(a,d){a.style[p]=d}});var s=v("backfaceVisibility");s&&"backfaceVisibility"!==s&&(a.cssHooks.backfaceVisibility={get:function(c,d,g){return a.css(c,s)},set:function(a,d){a.style[s]=d}});a.fn.imagebox=function(c){return this.each(function(){c=c||{};var d=a(this),g=d.children(),f=g.get();"static"==d.css("position")&&d.css("position","relative");var b=a.extend({},a.fn.imagebox.defaults,c||{}),e=a("<div />"),h=a('<div id="imageBox-container" />');e.css({position:"absolute",
border:b.border,width:b.width,height:b.height,boxShadow:b.boxShadow});var p=n.floor(parseInt(d.width()/e.width())),u=n.ceil(f.length/p),t,s,w,l,m=0,v=b.boxChaos,A=b.maxRotate,q=0,y=0,B,r,k=b.iBgallery;a.each(g,function(c){w=n.cos(n.PI*n.round(n.random()));m=n.floor(n.random()*v)*w;l=n.floor(n.random()*A)*w;t=parseInt(b.width)*q;s=parseInt(b.height)*y;q<p-1?q++:(q=0,y+=1);a(f[c]).css("display","block");B="imageBox-"+c;a(this).wrap(e.attr("id",B));a(f[c]).attr("data-rot",l);a(this).parent().css({left:t+
m,top:s+m,zIndex:90+m,transform:"scale(1.0,1.0) rotate("+l+"deg)"});a(this).find("img").css({backfaceVisibility:"hidden",transformOriginX:"0",transformOriginY:"0",perspective:1E3,transform:"translateZ(0) scale(1.0, 1.0)",position:"relative",maxWidth:"100%",display:"block"});a(this).css({width:b.width,height:b.height});b.slimbox&&a(this).attr("rel","imageBox-"+k+"")});h.css({paddingTop:parseInt(e.height()/2),paddingBottom:parseInt(e.height()/2)});d.css({width:parseInt(e.width()*p),height:parseInt(e.height()*
u)}).wrap(h);g.hover(function(){r=b.scale;a(this).parent().css({boxShadow:b.boxShadowHover,zIndex:parseInt(a(this)[0].parentNode.style.zIndex)+1E3,transition:"all, .2s",transform:"scale("+r[0]+","+r[1]+") rotate(0deg)"})},function(){a(this).parent().css({boxShadow:b.boxShadow,zIndex:parseInt(a(this)[0].parentNode.style.zIndex)-1E3,transition:"all, .1s",transform:"scale(1,1) rotate("+a(this).attr("data-rot")+"deg)"})});jQuery().slimbox?(console.log("M'KAY"),b.slimbox&&a.fn.imagebox.slimbox(b.slimOptions)):
console.log("TROUBLE!!!")})};a.fn.imagebox.ver=function(){return"0.1.4"};a.fn.imagebox.defaults={width:"50px",height:"75px",boxShadow:"0 0 10px rgba(0,0,0,.5)",boxShadowHover:"0 0 10px rgba(0,0,0,1)",border:0,maxRotate:10,scale:[1.1,1.1],boxChaos:20,slimbox:!1,slimOptions:{loop:!1,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]},iBgallery:""};a.fn.imagebox.slimbox=function(c){c=c||{};a('a[rel^="imageBox"]').slimbox({loop:c.loop,overlayOpacity:c.overlayOpacity,overlayFadeDuration:c.overlayFadeDuration,resizeDuration:c.resizeDuration,resizeEasing:c.resizeEasing,initialWidth:c.initialWidth,initialHeight:c.initialHeight,imageFadeDuration:c.imageFadeDuration,captionAnimationDuration:c.captionAnimationDuration,counterText:c.counterText,closeKeys:c.closeKeys,previousKeys:c.previousKeys,nextKeys:c.nextKeys},
null,function(a){return this==a||8<this.rel.length&&this.rel==a.rel})}})(jQuery,window,document,Math);
/*!
Slimbox v2.05 - The ultimate lightweight Lightbox clone for jQuery
(c) 2007-2013 Christophe Beyls <http://www.digitalia.be>
MIT-style license.
*/
(function(a){function H(){var b=f.scrollLeft(),c=f.width();a([k,z]).css("left",b+c/2);K&&a(r).css({left:b,top:f.scrollTop(),width:c,height:f.height()})}function C(b){b?a("object").add(L?"select":"embed").each(function(a,b){A[a]=[b,b.style.visibility];b.style.visibility="hidden"}):(a.each(A,function(a,b){b[0].style.visibility=b[1]}),A=[]);b=b?"bind":"unbind";f[b]("scroll resize",H);a(document)[b]("keydown",n)}function n(c){c=c.which;var e=a.inArray;return 0<=e(c,b.closeKeys)?g():0<=e(c,b.nextKeys)?
v():0<=e(c,b.previousKeys)?I():null}function I(){return p(u)}function v(){return p(t)}function p(a){0<=a&&(h=a,D=e[h][0],u=(h||(b.loop?e.length:0))-1,t=(h+1)%e.length||(b.loop?0:-1),d(),k.className="lbLoading",q=new Image,q.onload=s,q.src=D);return!1}function s(){k.className="";a(x).css({backgroundImage:"url("+D+")",visibility:"hidden",display:""});a(J).width(q.width);a([J,E,F]).height(q.height);a(M).html(e[h][1]||"");a(N).html((1<e.length&&b.counterText||"").replace(/{x}/,h+1).replace(/{y}/,e.length));
0<=u&&(y.src=e[u][0]);0<=t&&(B.src=e[t][0]);l=x.offsetWidth;m=x.offsetHeight;var d=Math.max(0,w-m/2);k.offsetHeight!=m&&a(k).animate({height:m,top:d},b.resizeDuration,b.resizeEasing);k.offsetWidth!=l&&a(k).animate({width:l,marginLeft:-l/2},b.resizeDuration,b.resizeEasing);a(k).queue(function(){a(z).css({width:l,top:d+m,marginLeft:-l/2,visibility:"hidden",display:""});a(x).css({display:"none",visibility:"",opacity:""}).fadeIn(b.imageFadeDuration,c)})}function c(){0<=u&&a(E).show();0<=t&&a(F).show();
a(G).css("marginTop",-G.offsetHeight).animate({marginTop:0},b.captionAnimationDuration);z.style.visibility=""}function d(){q.onload=null;q.src=y.src=B.src=D;a([k,x,G]).stop(!0);a([E,F,x,z]).hide()}function g(){0<=h&&(d(),h=u=t=-1,a(k).hide(),a(r).stop().fadeOut(b.overlayFadeDuration,C));return!1}var f=a(window),b,e,h=-1,D,u,t,K,w,l,m,L=!window.XMLHttpRequest,A=[],q={},y=new Image,B=new Image,r,k,x,J,E,F,z,G,M,N;a(function(){a("body").append(a([r=a('<div id="lbOverlay" />').click(g)[0],k=a('<div id="lbCenter" />')[0],
z=a('<div id="lbBottomContainer" />')[0]]).css("display","none"));x=a('<div id="lbImage" />').appendTo(k).append(J=a('<div style="position: relative;" />').append([E=a('<a id="lbPrevLink" href="#" />').click(I)[0],F=a('<a id="lbNextLink" href="#" />').click(v)[0]])[0])[0];G=a('<div id="lbBottom" />').appendTo(z).append([a('<a id="lbCloseLink" href="#" />').click(g)[0],M=a('<div id="lbCaption" />')[0],N=a('<div id="lbNumber" />')[0],a('<div style="clear: both;" />')[0]])[0]});a.slimbox=function(c,
d,h){b=a.extend({loop:!1,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]},h);"string"==typeof c&&(c=[[c,d]],d=0);w=f.scrollTop()+f.height()/2;l=b.initialWidth;m=b.initialHeight;a(k).css({top:Math.max(0,w-m/2),width:l,height:m,marginLeft:-l/2}).show();if(K=L||r.currentStyle&&"fixed"!=r.currentStyle.position)r.style.position=
"absolute";a(r).css("opacity",b.overlayOpacity).fadeIn(b.overlayFadeDuration);H();C(1);e=c;b.loop=b.loop&&1<e.length;return p(d)};a.fn.slimbox=function(b,c,d){c=c||function(a){return[a.href,a.title]};d=d||function(){return!0};var e=this;return e.unbind("click").click(function(){var h=this,k=0,g,f=0,l;g=a.grep(e,function(a,b){return d.call(h,a,b)});for(l=g.length;f<l;++f)g[f]==h&&(k=f),g[f]=c(g[f],f);return a.slimbox(g,k,b)})}})(jQuery);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment