%PDF- %PDF-
| Direktori : /opt/bitnami/apps/moodle/htdocs/lib__d9c9c01/amd/build/ |
| Current File : /opt/bitnami/apps/moodle/htdocs/lib__d9c9c01/amd/build/tooltip.min.js.map |
{"version":3,"sources":["../src/tooltip.js"],"names":["define","$","Aria","Tooltip","selector","_regionSelector","each","index","element","tooltipId","attr","tooltipele","document","getElementById","correctRole","hide","on","_handleFocus","bind","_handleMouseOver","_handleMouseOut","_handleBlur","_handleKeyDown","prototype","_showTooltip","e","triggerElement","target","show","unhide","is","inner","append","contents","addClass","pos","offset","top","height","_hideTooltip","which"],"mappings":"AAAAA,OAAM,gBAAC,CAAC,QAAD,CAAW,WAAX,CAAD,CAA0B,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CAO9C,GAAIC,CAAAA,CAAO,CAAG,SAASC,CAAT,CAAmB,CAE7B,KAAKC,eAAL,CAAuBD,CAAvB,CAIAH,CAAC,CAAC,KAAKI,eAAN,CAAD,CAAwBC,IAAxB,CAA6B,SAASC,CAAT,CAAgBC,CAAhB,CAAyB,CAClD,GAAIC,CAAAA,CAAS,CAAGR,CAAC,CAACO,CAAD,CAAD,CAAWE,IAAX,CAAgB,kBAAhB,CAAhB,CACA,GAAID,CAAJ,CAAe,CACX,GAAIE,CAAAA,CAAU,CAAGC,QAAQ,CAACC,cAAT,CAAwBJ,CAAxB,CAAjB,CACA,GAAIE,CAAJ,CAAgB,CACZ,GAAIG,CAAAA,CAAW,CAAiC,SAA9B,EAAAb,CAAC,CAACU,CAAD,CAAD,CAAcD,IAAd,CAAmB,MAAnB,CAAlB,CAEA,GAAII,CAAJ,CAAiB,CACbb,CAAC,CAACU,CAAD,CAAD,CAAcI,IAAd,GAEAd,CAAC,CAACO,CAAD,CAAD,CAAWE,IAAX,CAAgB,UAAhB,CAA4B,GAA5B,CACH,CAGDT,CAAC,CAACO,CAAD,CAAD,CAAWQ,EAAX,CAAc,OAAd,CAAuB,KAAKC,YAAL,CAAkBC,IAAlB,CAAuB,IAAvB,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,CAACE,MAAH,CAAtB,CAEA,GAAI,CAACD,CAAc,CAACI,EAAf,CAAkB,QAAlB,CAAL,CAAkC,CAC9B,KAAKS,YAAL,CAAkBd,CAAlB,CACH,CACJ,CAND,CAYAtB,CAAO,CAACoB,SAAR,CAAkBF,WAAlB,CAAgC,SAASI,CAAT,CAAY,CACxC,KAAKc,YAAL,CAAkBd,CAAlB,CACH,CAFD,CAIA,MAAOtB,CAAAA,CACV,CApIK,CAAN","sourcesContent":["define(['jquery', 'core/aria'], function($, Aria) {\n\n /**\n * Tooltip class.\n *\n * @param {String} selector The css selector for the node(s) to enhance with tooltips.\n */\n var Tooltip = function(selector) {\n // Tooltip code matches: http://www.w3.org/WAI/PF/aria-practices/#tooltip\n this._regionSelector = selector;\n\n // For each node matching the selector - find an aria-describedby attribute pointing to an role=\"tooltip\" element.\n\n $(this._regionSelector).each(function(index, element) {\n var tooltipId = $(element).attr('aria-describedby');\n if (tooltipId) {\n var tooltipele = document.getElementById(tooltipId);\n if (tooltipele) {\n var correctRole = $(tooltipele).attr('role') == 'tooltip';\n\n if (correctRole) {\n $(tooltipele).hide();\n // Ensure the trigger for the tooltip is keyboard focusable.\n $(element).attr('tabindex', '0');\n }\n\n // Attach listeners.\n $(element).on('focus', this._handleFocus.bind(this));\n $(element).on('mouseover', this._handleMouseOver.bind(this));\n $(element).on('mouseout', this._handleMouseOut.bind(this));\n $(element).on('blur', this._handleBlur.bind(this));\n $(element).on('keydown', this._handleKeyDown.bind(this));\n }\n }\n }.bind(this));\n };\n\n /** @type {String} Selector for the page region containing the user navigation. */\n Tooltip.prototype._regionSelector = null;\n\n /**\n * Find the tooltip referred to by this element and show it.\n *\n * @param {Event} e\n */\n Tooltip.prototype._showTooltip = function(e) {\n var triggerElement = $(e.target);\n var tooltipId = triggerElement.attr('aria-describedby');\n if (tooltipId) {\n var tooltipele = $(document.getElementById(tooltipId));\n\n tooltipele.show();\n Aria.unhide(tooltipele);\n\n if (!tooltipele.is('.tooltip')) {\n // Change the markup to a bootstrap tooltip.\n var inner = $('<div class=\"tooltip-inner\"></div>');\n inner.append(tooltipele.contents());\n tooltipele.append(inner);\n tooltipele.addClass('tooltip');\n tooltipele.addClass('bottom');\n tooltipele.append('<div class=\"tooltip-arrow\"></div>');\n }\n var pos = triggerElement.offset();\n pos.top += triggerElement.height() + 10;\n $(tooltipele).offset(pos);\n }\n };\n\n /**\n * Find the tooltip referred to by this element and hide it.\n *\n * @param {Event} e\n */\n Tooltip.prototype._hideTooltip = function(e) {\n var triggerElement = $(e.target);\n var tooltipId = triggerElement.attr('aria-describedby');\n if (tooltipId) {\n var tooltipele = document.getElementById(tooltipId);\n\n $(tooltipele).hide();\n Aria.hide(tooltipele);\n }\n };\n\n /**\n * Listener for focus events.\n * @param {Event} e\n */\n Tooltip.prototype._handleFocus = function(e) {\n this._showTooltip(e);\n };\n\n /**\n * Listener for keydown events.\n * @param {Event} e\n */\n Tooltip.prototype._handleKeyDown = function(e) {\n if (e.which == 27) {\n this._hideTooltip(e);\n }\n };\n\n /**\n * Listener for mouseover events.\n * @param {Event} e\n */\n Tooltip.prototype._handleMouseOver = function(e) {\n this._showTooltip(e);\n };\n\n /**\n * Listener for mouseout events.\n * @param {Event} e\n */\n Tooltip.prototype._handleMouseOut = function(e) {\n var triggerElement = $(e.target);\n\n if (!triggerElement.is(\":focus\")) {\n this._hideTooltip(e);\n }\n };\n\n /**\n * Listener for blur events.\n * @param {Event} e\n */\n Tooltip.prototype._handleBlur = function(e) {\n this._hideTooltip(e);\n };\n\n return Tooltip;\n});\n"],"file":"tooltip.min.js"}