ttrss/lib/dijit/Tooltip.js

2 lines
7.4 KiB
JavaScript
Raw Permalink Normal View History

2012-08-14 14:59:10 +00:00
//>>built
require({cache:{"url:dijit/templates/Tooltip.html":"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\" data-dojo-attach-event=\"mouseenter:onMouseEnter,mouseleave:onMouseLeave\"\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></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,_16,_17){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:_18.defaultPosition,!rtl,_7.hitch(this,"orient"));var _19=pos.aroundNodePos;if(pos.corner.charAt(0)=="M"&&pos.aroundCorner.charAt(0)=="M"){this.connectorNode.style.top=_19.y+((_19.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=_19.x+((_19.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;this.onMouseEnter=_16||_1a;this.onMouseLeave=_17||_1a;},orient:function(_1b,_1c,_1d,_1e,_1f){this.connectorNode.style.top="";var _20=_1e.h,_21=_1e.w;_1b.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"}[_1c+"-"+_1d];this.domNode.style.width="auto";var _22=_5.position(this.domNode);if(_9("ie")||_9("trident")){_22.w+=2;}var _23=Math.min((Math.max(_21,1)),_22.w);_5.setMarginBox(this.domNode,{w:_23});if(_1d.charAt(0)=="B"&&_1c.charAt(0)=="B"){var bb=_5.position(_1b);var _24=this.connectorNode.offsetHeight;if(bb.h>_20){var _25=_20-((_1f.h+_24)>>1);this.connectorNode.style.top=_25+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_1f.h/2-_24/2,0),bb.h-_24)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,_22.w-_21);},_onShow:function(){if(_9("ie")){this.domNode.style.filter="";}},hide:function(_26){if(this._onDeck&&this._onDeck[1]==_26){this._onDeck=null;}else{if(this.aroundNode===_26){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}this.onMouseEnter=this.onMouseLeave=_1a;},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});if(_9("dojo-bidi")){_11.extend({_setAutoTextDir:function(_27){this.applyTextDir(_27);_1.forEach(_27.children,function(_28){this._setAutoTextDir(_28);},this);},_setTextDirAttr:function(_29){this._set("textDir",_29);if(_29=="auto"){this._setAutoTextDir(this.containerNode);}else{this.containerNode.d