File manager - Edit - /home/jardides/www/Jardi-design/j37/media/com_fabrik/js/dist/tips.js
Back
/*! Fabrik */ var FloatingTips=new Class({Implements:[Options,Events],options:{fxProperties:{transition:Fx.Transitions.linear,duration:500},position:"top",showOn:"mouseenter",hideOn:"mouseleave",content:"title",distance:50,tipfx:"Fx.Transitions.linear",duration:500,fadein:!1,showFn:function(a){return a.stop(),!0},hideFn:function(a){return a.stop(),!0}},initialize:function(elements,options){this.setOptions(options),this.options.fxProperties={transition:eval(this.options.tipfx),duration:this.options.duration},window.addEvent("tips.hideall",function(a,b){"element"===typeOf(a)&&(b=a),this.hideOthers(b)}.bind(this)),elements&&this.attach(elements)},attach:function(a){this.elements=$$(a),this.elements.each(function(a){var b={};a.get("opts","{}").opts&&JSON.validate(a.get("opts","{}").opts)&&(b=JSON.decode(a.get("opts","{}").opts));var c=Object.merge(Object.clone(this.options),b),d=a.retrieve("opts",{});if(a.erase("opts"),!d[c.showOn]){d[c.showOn]=c,a.store("opts",d);var e=this.getTipContent(a,c.showOn),f=new Element("div.floating-tip.tip"+c.position),g=new Element("div.floating-tip-wrapper");"string"===typeOf(e)?(e=Encoder.htmlDecode(e),f.set("html",e)):f.adopt(e),g.adopt(f),g.inject(document.body).hide(),g.addEvent("mouseleave",function(){"mouseleave"===c.hideOn&&g.hide()}.bind(this));var h=a.retrieve("tip",{});h[c.showOn]=g,a.store("tip",h);var i={onComplete:function(){this.hideMe&&this.tip.hide()},onStart:function(){this.hideMe=!1}},j=Object.merge(i,Object.clone(this.options.fxProperties)),k=new Fx.Morph(g,j);k.tip=g;var l=a.retrieve("fx",{});l[c.showOn]=k,a.store("fxs",l),this.addStartEvent(a,c.showOn),this.addEndEvent(a,c.showOn)}}.bind(this))},addStartEvent:function(a,b){var c=a.retrieve("opts");c=c[b],a.addEvent(c.showOn,function(d){if("click"===c.showOn){var e=a.retrieve("active",!1),f=e?!1:!0;if(a.store("active",f),e)return}c.showFn(d,a)&&(window.fireEvent("tips.hideall",[a]),this.show(a,b))}.bind(this))},addEndEvent:function(a,b){var c=a.retrieve("opts");c=c[b],a.addEvent(c.hideOn,function(d){{var e=a.retrieve("tip");e[c.showOn]}c.hideFn(d)&&this.hide(a,b)}.bind(this))},getTipContent:function(a,b){var c,d=a.retrieve("opts");d=d[b];var e=d.content;switch(typeOf(e)){case"string":c=a.get(e),a.set(e,"");break;case"element":c=e;break;default:c=e(a)}return c},show:function(a,b){var c=a.retrieve("tip"),d=a.retrieve("opts");d=d[b];var e=c[d.showOn];if(1!==e.getStyle("opacity")||"none"===e.getStyle("display")||"null"===typeOf(e.getParent())){e.setStyle("opacity",0),e.show(),"null"===typeOf(d.position)&&(d.position="left");var f=d.distance;switch(d.position){case"top":var g=e.getStyle("border-top").toInt()+e.getStyle("border-bottom").toInt(),h={x:0,y:-1*f-2*g};edge="top";break;case"bottom":edge="top",g=e.getStyle("border-top").toInt()+e.getStyle("border-bottom").toInt(),h={x:0,y:f+g};break;case"right":g=e.getStyle("border-left").toInt()+e.getStyle("border-right").toInt(),h={x:f+g,y:0},edge="left";break;default:case"left":g=e.getStyle("border-left").toInt()+e.getStyle("border-right").toInt(),h={x:-1*f-g,y:0},edge="right"}var i={relativeTo:a,position:d.position,edge:edge,offset:h};e.position(i),this.options.fadein||e.setStyle("opacity",1);{var j=this.options.fadein?{opacity:[0,1]}:{};e.getCoordinates(),a.getCoordinates()}switch(d.position){case"top":var k=e.getStyle("top").toInt()-e.getStyle("height").toInt();j.top=[k,k+f];break;case"bottom":k=e.getStyle("top").toInt(),j.top=[k,k-f];break;case"right":l=e.getStyle("left").toInt(),j.left=[l,l-f];break;case"left":l=e.getStyle("left").toInt(),j.left=[l,l+f]}var m=a.retrieve("fxs"),n=m[d.showOn];n.isRunning()||n.start(j)}},hide:function(a,b){var c=a.retrieve("opts");c=c[b];var d=a.retrieve("tip"),e=d[c.showOn],f=a.retrieve("fxs"),g=f[c.showOn];this.hideOthers(a),g.isRunning()&&"mouseenter"!==c.showOn&&"mouseleave"!==c.hideOn||(g.hideMe=!0,e.hide(),a.store("active",!1))},hideOthers:function(a){this.element&&this.elements.each(function(b){if(b!==a){var c=b.retrieve("tip");$H(c).each(function(a){a.hide()})}})},hideAll:function(){this.elements.each(function(a){var b=a.retrieve("tip");$H(b).each(function(a){a.hide()})})}});
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings