You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
33 KiB
JavaScript

5 years ago
/* qTip2 v2.1.1 tips | qtip2.com | Licensed MIT, GPL | Fri Aug 30 2013 08:44:23 */
!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","imagesloaded"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=C,this.elements=elements={target:a},this._id=O+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache=cache={event:{},target:d(),disabled:B,attr:e,onTooltip:B,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=B}function f(a){return a===C||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?B:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?B:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==B,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,C,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||B)&&(b.title=B))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===A?{ready:A}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(N,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return R.concat("").join(a?"-"+a+" ":" ")}function l(a){if(this.tooltip.hasClass(Y))return B;clearTimeout(this.timers.show),clearTimeout(this.timers.hide);var b=d.proxy(function(){this.toggle(A,a)},this);this.options.show.delay>0?this.timers.show=setTimeout(b,this.options.show.delay):b()}function m(a){if(this.tooltip.hasClass(Y))return B;var b=d(a.relatedTarget),c=b.closest(S)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else{var g=d.proxy(function(){this.toggle(B,a)},this);this.options.hide.delay>0?this.timers.hide=setTimeout(g,this.options.hide.delay):g()}}function n(a){return this.tooltip.hasClass(Y)||!this.options.hide.inactive?B:(clearTimeout(this.timers.inactive),this.timers.inactive=setTimeout(d.proxy(function(){this.hide(a)},this),this.options.hide.inactive),void 0)}function o(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function p(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(cb+" "))+cb,function(){var a=v.api[d.attr(this,Q)];a&&!a.disabled&&e.apply(a,arguments)})}function q(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):C,p="html5"===f.metadata.type&&o?o[f.metadata.name]:C,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(A,{},v.defaults,f,"object"==typeof q?h(q):C,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===B||!j)return B;k.content.text=j}if(i.container.length||(i.container=m),i.target===B&&(i.target=n),k.show.target===B&&(k.show.target=n),k.show.solo===A&&(k.show.solo=i.container.closest("body")),k.hide.target===B&&(k.hide.target=n),k.position.viewport===A&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new x(i.at,A),i.my=new x(i.my),a.data(O))if(k.overwrite)a.qtip("destroy");else if(k.overwrite==
}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),db=N.tip=function(a){return new u(a,a.options.style.tip)},db.initialize="render",db.sanitize=function(a){a.style&&"tip"in a.style&&(opts=a.style.tip,"object"!=typeof opts&&(opts=a.style.tip={corner:opts}),/string|boolean/i.test(typeof opts.corner)||(opts.corner=A))},y.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(A,v.defaults,{style:{tip:{corner:A,mimic:B,width:6,height:6,border:A,offset:0}}})})}(window,document);