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.
tt-rss/lib/dijit/Tooltip.js

2 lines
6.5 KiB
JavaScript

//>>built
require({cache:{"url:dijit/templates/Tooltip.html":"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n></div>\n"}});define("dijit/Tooltip",["dojo/_base/array","dojo/_base/declare","dojo/_base/fx","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang","dojo/mouse","dojo/on","dojo/sniff","./_base/manager","./place","./_Widget","./_TemplatedMixin","./BackgroundIframe","dojo/text!./templates/Tooltip.html","./main"],function(_1,_2,fx,_3,_4,_5,_6,_7,_8,on,_9,_a,_b,_c,_d,_e,_f,_10){var _11=_2("dijit._MasterTooltip",[_c,_d],{duration:_a.defaultDuration,templateString:_f,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new _e(this.domNode);this.fadeIn=fx.fadeIn({node:this.domNode,duration:this.duration,onEnd:_7.hitch(this,"_onShow")});this.fadeOut=fx.fadeOut({node:this.domNode,duration:this.duration,onEnd:_7.hitch(this,"_onHide")});},show:function(_12,_13,_14,rtl,_15){if(this.aroundNode&&this.aroundNode===_13&&this.containerNode.innerHTML==_12){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_12;if(_15){this.set("textDir",_15);}this.containerNode.align=rtl?"right":"left";var pos=_b.around(this.domNode,_13,_14&&_14.length?_14:_16.defaultPosition,!rtl,_7.hitch(this,"orient"));var _17=pos.aroundNodePos;if(pos.corner.charAt(0)=="M"&&pos.aroundCorner.charAt(0)=="M"){this.connectorNode.style.top=_17.y+((_17.h-this.connectorNode.offsetHeight)>>1)-pos.y+"px";this.connectorNode.style.left="";}else{if(pos.corner.charAt(1)=="M"&&pos.aroundCorner.charAt(1)=="M"){this.connectorNode.style.left=_17.x+((_17.w-this.connectorNode.offsetWidth)>>1)-pos.x+"px";}else{this.connectorNode.style.left="";this.connectorNode.style.top="";}}_6.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_13;},orient:function(_18,_19,_1a,_1b,_1c){this.connectorNode.style.top="";var _1d=_1b.h,_1e=_1b.w;_18.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_19+"-"+_1a];this.domNode.style.width="auto";var _1f=_5.position(this.domNode);if(_9("ie")==9){_1f.w+=2;}var _20=Math.min((Math.max(_1e,1)),_1f.w);_5.setMarginBox(this.domNode,{w:_20});if(_1a.charAt(0)=="B"&&_19.charAt(0)=="B"){var bb=_5.position(_18);var _21=this.connectorNode.offsetHeight;if(bb.h>_1d){var _22=_1d-((_1c.h+_21)>>1);this.connectorNode.style.top=_22+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_1c.h/2-_21/2,0),bb.h-_21)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,_1f.w-_1e);},_onShow:function(){if(_9("ie")){this.domNode.style.filter="";}},hide:function(_23){if(this._onDeck&&this._onDeck[1]==_23){this._onDeck=null;}else{if(this.aroundNode===_23){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}},_setAutoTextDir:function(_24){this.applyTextDir(_24,_9("ie")?_24.outerText:_24.textContent);_1.forEach(_24.children,function(_25){this._setAutoTextDir(_25);},this);},_setTextDirAttr:function(_26){this._set("textDir",_26);if(_26=="auto"){this._setAutoTextDir(this.containerNode);}else{this.containerNode.dir=this.textDir;}}});_10.showTooltip=function(_27,_28,_29,rtl,_2a){if(_29){_29=_1.map(_29,function(val){return {after:"after-centered",before:"before-centered"}[val]||val;});}if(!_16._