misp-website/assets/js/skel-layers.min.js

2 lines
15 KiB
JavaScript
Raw Normal View History

2015-01-07 23:34:47 +01:00
/* skel-layers.js v1.0 | (c) n33 | n33.co | MIT licensed */
skel.registerPlugin("layers",function(e){function dn(e,r,i){var o,u;this.id=e,this.index=i,this[n]={breakpoints:T,states:T,position:T,side:T,animation:bt,orientation:bt,width:0,height:0,zIndex:this.index,html:"",hidden:P,exclusive:Mt,resetScroll:Mt,resetForms:Mt,swipeToHide:Mt,clickToHide:P},t._.extend(this[n],r),this[W]=t._.newDiv(this[n][qt]),this[W].id=e,this[W]._layer=this,this[s]=T,this[St]=T,this[xt]=T,this[U]=P,u=t._.cacheElement(this.id,this[W],ct,1),u.onAttach=function(){var e=this[Vt]._layer;e[rt]()||e.init(),e.resume()},u.onDetach=function(){var e=this[Vt]._layer;e.suspend()},this[n].states&&this[n].states!=t._.sd?(o=t._[hn](this[n].states),t._[Ot](o,function(e){t._.addCachedElementToState(o[e],u)})):(this[n].breakpoints?o=t._[hn](this[n].breakpoints):o=t._.breakpointList,t._[Ot](o,function(e){t._.addCachedElementToBreakpoint(o[e],u)}))}var t,n="config",r="_skel_layers_translateOrigin",i="cache",s="$element",o="_skel_layers_translate",u="_skel_layers_resetForms",f="visibleWrapper",l="_skel_layers_resume",c="_skel_layers_promote",h="exclusiveLayer",p="_skel_layers_demote",d="moveToVisibleWrapper",v="moveToHiddenWrapper",m="setTimeout",g="right",y="bottom",b="position",w="useActive",E="width",S="css",x="scrollTop",T=null,N="center",C="_skel_layers_suspend",k="prototype",L="left",A="wrapper",O="skel-layers-layer-z-index",M="_skel_layers_init",_="children",D="skel-layers-moved",P=!1,H=".skel-layers-fixed:not(.skel-layers-moved)",B="transform",j="length",F="height",I="top",q="deviceType",R="touchstart.lock click.lock scroll.lock",U="visible",z="hiddenWrapper",W="element",X='<div id="skel-layers-placeholder-',V="stopPropagation",$="resetForms",J="overflow-x",K="preventDefault",Q="window",G="-webkit-",Y="recalcW",Z="skel-layers-exclusiveVisible",et="padding-bottom",tt="hidden",nt="-webkit-tap-highlight-color",rt="isInitialized",it="animation",st="originalEvent",ot="skel-layers-layer-position",ut="skel-layers-layer-index",at="z-index",ft="unlockView",lt="animations",ct="skel_layers_hiddenWrapper",ht="#skel-layers-placeholder-",pt="layers",dt="_skel_layers_initializeCell",vt="resize.lock scroll.lock",mt="registerLocation",gt="undefined",yt="orientationchange.lock",bt="none",wt="find",Et="speed",St="touchPosX",xt="touchPosY",Tt="positions",Nt="_skel_layers_expandCell",Ct="-moz-",kt="attr",Lt="_skel_layers_hasParent",At="append",Ot="iterate",Mt=!0,_t="lockView",Dt="-ms-",Pt="DOMReady",Ht="isTouch",Bt="addClass",jt="hide",Ft="auto",It="_skel_layers_scrollPos",qt="html",Rt="_skel_layers_xcss",Ut="-o-",zt="transformBreakpoints",Wt="rgba(0,0,0,0)",Xt="removeClass",Vt="object",$t="appendTo",Jt="vars",Kt="cell-size",Qt="body",Gt="-",Yt="click",Zt="px",en="show",tn="side",nn="recalcH",rn="touches",sn="isVisible",on="overflow-",un="relative",an="android",fn="*",ln="htmlbody",cn="transformTest",hn="getArray",pn="#";return typeof e==gt?P:(e.fn[p]=function(){var t,n;if(this[j]>1){for(t=0;t<this[j];t++)e(this[t])[p]();return e(this)}return n=e(this),n[S](at,n.data(O)).data(O,""),n},e.fn[Nt]=function(){var t=e(this),n=t.parent(),r=12;n[_]().each(function(){var t=e(this),n=t[kt]("class");n&&n.match(/(\s+|^)([0-9]+)u(\s+|$)/)&&(r-=parseInt(RegExp.$2))}),r>0&&(t[dt](),t[S](E,(t.data(Kt)+r)/12*100+"%"))},e.fn[Lt]=function(){return e(this).parents()[j]>0},e.fn[dt]=function(){var t=e(this);t[kt]("class").match(/(\s+|^)([0-9]+)u(\s+|$)/)&&t.data(Kt,parseInt(RegExp.$2))},e.fn[c]=function(r){var i,s,o;if(this[j]>1){for(i=0;i<this[j];i++)e(this[i])[c](r);return e(this)}return s=e(this),isNaN(o=parseInt(s.data(ut)))&&(o=0),s.data(O,s[S](at))[S](at,t[n].baseZIndex+o+(r?r:1)),s},e.fn[u]=function(){var t=e(this);return e(this)[wt]("form").each(function(){this.reset()}),t},e.fn[Rt]=function(t,n){return e(this)[S](t,n)[S](Ct+t,Ct+n)[S](G+t,G+n)[S](Ut+t,Ut+n)[S](Dt+t,Dt+n)},e.fn._skel_layers_xcssProperty=function(t,n){return e(this)[S](t,n)[S](Ct+t,n)[S](G+t,n)[S](Ut+t,n)[S](Dt+t,n)},e.fn._skel_layers_xcssValue=function(t,n){return e(this)[S](t,n)[S](t,Ct+n)[S](t,G+n)[S](t,Ut+n)[S](t,Dt+n)},dn[k][lt]={none:{show:function(e){var t=e[n],r=e[s];r[x](0)