Home | History | Annotate | Download | only in test

Lines Matching refs:slideIn

1 else{k()}return this},detach:function(c){var d=function(a){a.removeEvent(this.options.trigger,a.retrieve("accordion:display"))}.bind(this);if(!c){this.togglers.each(d)}else{d(c)}return this},display:function(i,p){if(!this.check(i,p)){return this}var k={},l=this.elements,j=this.options,m=this.effects;if(p==null){p=true}if(typeOf(i)=="element"){i=l.indexOf(i)}if(i==this.current&&!j.alwaysHide){return this}if(j.resetHeight){var n=l[this.current];if(n&&!this.selfHidden){for(var o in m){n.setStyle(o,n[m[o]])}}}if((this.timer&&j.link=="chain")||(i===this.current&&!j.alwaysHide)){return this}if(this.current!=null){this.previous=this.current}this.current=i;this.selfHidden=false;l.each(function(b,c){k[c]={};var d;if(c!=i){d=true}else{if(j.alwaysHide&&((b.offsetHeight>0&&j.height)||b.offsetWidth>0&&j.width)){d=true;this.selfHidden=true}}this.fireEvent(d?"background":"active",[this.togglers[c],b]);for(var a in m){k[c][a]=d?0:b[m[a]]}if(!p&&!d&&j.resetHeight){k[c].height="auto"}},this);this.internalChain.clearChain();this.internalChain.chain(function(){if(j.resetHeight&&!this.selfHidden){var a=l[i];if(a){a.setStyle("height","auto")}}}.bind(this));return p?this.start(k):this.set(k).internalChain.callChain()}});Fx.Move=new Class({Extends:Fx.Morph,options:{relativeTo:document.body,position:"center",edge:false,offset:{x:0,y:0}},start:function(e){var d=this.element,f=d.getStyles("top","left");if(f.top=="auto"||f.left=="auto"){d.setPosition(d.getPosition(d.getOffsetParent()))}return this.parent(d.position(Object.merge({},this.options,e,{returnPos:true})))}});Element.Properties.move={set:function(b){this.get("move").cancel().setOptions(b);return this},get:function(){var b=this.retrieve("move");if(!b){b=new Fx.Move(this,{link:"cancel"});this.store("move",b)}return b}};Element.implement({move:function(b){this.get("move").start(b);return this}});(function(){Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(h,a){this.element=this.subject=document.id(h);this.parent(a);if(typeOf(this.element)!="element"){this.element=document.id(this.element.getDocument().body)}if(this.options.wheelStops){var g=this.element,f=this.cancel.pass(false,this);this.addEvent("start",function(){g.addEvent("mousewheel",f)},true);this.addEvent("complete",function(){g.removeEvent("mousewheel",f)},true)}},set:function(){var a=Array.flatten(arguments);this.element.scrollTo(a[0],a[1]);return this},compute:function(e,f,a){return[0,1].map(function(c){return Fx.compute(e[c],f[c],a)})},start:function(f,e){if(!this.check(f,e)){return this}var a=this.element.getScroll();return this.parent([a.x,a.y],[f,e])},calculateScroll:function(m,n){var p=this.element,r=p.getScrollSize(),l=p.getScroll(),a=p.getSize(),q=this.options.offset,k={x:m,y:n};for(var o in k){if(!k[o]&&k[o]!==0){k[o]=l[o]}if(typeOf(k[o])!="number"){k[o]=r[o]-a[o]}k[o]+=q[o]}return[k.x,k.y]},toTop:function(){return this.start.apply(this,this.calculateScroll(false,0))},toLeft:function(){return this.start.apply(this,this.calculateScroll(0,false))},toRight:function(){return this.start.apply(this,this.calculateScroll("right",false))},toBottom:function(){return this.start.apply(this,this.calculateScroll(false,"bottom"))},toElement:function(g,f){f=f?Array.from(f):["x","y"];var h=b(this.element)?{x:0,y:0}:this.element.getScroll();var a=Object.map(document.id(g).getPosition(this.element),function(c,d){return f.contains(d)?c+h[d]:false});return this.start.apply(this,this.calculateScroll(a.x,a.y))},toElementEdge:function(p,m,o){m=m?Array.from(m):["x","y"];p=document.id(p);var k={},n=p.getPosition(this.element),a=p.getSize(),l=this.element.getScroll(),r=this.element.getSize(),q={x:n.x+a.x,y:n.y+a.y};["x","y"].each(function(c){if(m.contains(c)){if(q[c]>l[c]+r[c]){k[c]=q[c]-r[c]}if(n[c]<l[c]){k[c]=n[c]}}if(k[c]==null){k[c]=l[c]}if(o&&o[c]){k[c]=k[c]+o[c]}},this);if(k.x!=l.x||k.y!=l.y){this.start(k.x,k.y)}return this},toElementCenter:function(n,m,k){m=m?Array.from(m):["x","y"];n=document.id(n);var j={},p=n.getPosition(this.element),o=n.getSize(),a=this.element.getScroll(),l=this.element.getSize();["x","y"].each(function(c){if(m.contains(c)){j[c]=p[c]-(l[c]-o[c])/2}if(j[c]==null){j[c]=a[c]}if(k&&k[c]){j[c]=j[c]+k[c]}},this);if(j.x!=a.x||j.y!=a.y){this.start(j.x,j.y)}return this}});function b(a){return(/^(?:body|html)$/i).test(a.tagName)}})();Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true,resetHeight:false},initialize:function(e,f){e=this.element=this.subject=document.id(e);this.parent(f);f=this.options;var g=e.retrieve("wrapper"),h=e.getStyles("margin","position","overflow");if(f.hideOverflow){h=Object.append(h,{overflow:"hidden"})}if(f.wrapper){g=document.id(f.wrapper).setStyles(h)}if(!g){g=new Element("div",{styles:h}).wraps(e)}e.store("wrapper",g).setStyle("margin",0);if(e.getStyle("overflow")=="visible"){e.setStyle("overflow","hidden")}this.now=[];this.open=true;this.wrapper=g;this.addEvent("complete",function(){this.open=(g["offset"+this.layout.capitalize()]!=0);if(this.open&&this.options.resetHeight){g.setStyle("height","")}},true)},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight},horizontal:function(){this.margin="margin-left";this.layout="width";this.offset=this.element.offsetWidth},set:function(b){this.element.setStyle(this.margin,b[0]);this.wrapper.setStyle(this.layout,b[1]);return this},compute:function(f,d,e){return[0,1].map(function(a){return Fx.compute(f[a],d[a],e)})},start:function(h,l){if(!this.check(h,l)){return this}this[l||this.options.mode]();var m=this.element.getStyle(this.margin).toInt(),n=this.wrapper.getStyle(this.layout).toInt(),i=[[m,n],[0,this.offset]],j=[[m,n],[-this.offset,0]],k;switch(h){case"in":k=i;break;case"out":k=j;break;case"toggle":k=(n==0)?i:j}return this.parent(k[0],k[1])},slideIn:function(b){return this.start("in",b)},slideOut:function(b){return this.start("out",b)},hide:function(b){this[b||this.options.mode]();this.open=false;return this.set([-this.offset,0])},show:function(b){this[b||this.options.mode]();this.open=true;return this.set([0,this.offset])},toggle:function(b){return this.start("toggle",b)}});Element.Properties.slide={set:function(b){this.get("slide").cancel().setOptions(b);return this},get:function(){var b=this.retrieve("slide");if(!b){b=new Fx.Slide(this,{link:"cancel"});this.store("slide",b)}return b}};Element.implement({slide:function(i,h){i=i||"toggle";var f=this.get("slide"),g;switch(i){case"hide":f.hide(h);break;case"show":f.show(h);break;case"toggle":var j=this.retrieve("slide:flag",f.open);f[j?"slideOut":"slideIn