Webform module and config export
This commit is contained in:
parent
3e6a5cbed2
commit
0e15467384
1040 changed files with 117682 additions and 0 deletions
46
web/modules/contrib/webform/js/webform.tooltip.js
Normal file
46
web/modules/contrib/webform/js/webform.tooltip.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @file
|
||||
* Javascript behaviors for jQuery UI tooltip integration.
|
||||
*
|
||||
* Please Note:
|
||||
* jQuery UI's tooltip implementation is not very responsive or adaptive.
|
||||
*
|
||||
* @see https://www.drupal.org/node/2207383
|
||||
*/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Initialize jQuery UI tooltip element support.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*/
|
||||
Drupal.behaviors.webformTooltipElement = {
|
||||
attach: function (context) {
|
||||
$(context).find('.js-webform-tooltip-element').once('webform-tooltip-element').each(function () {
|
||||
var $element = $(this);
|
||||
var $description = $element.children('.description.visually-hidden');
|
||||
$element.tooltip({
|
||||
items: ':input',
|
||||
content: $description.html()
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize jQuery UI tooltip link support.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*/
|
||||
Drupal.behaviors.webformTooltipLink = {
|
||||
attach: function (context) {
|
||||
$(context).find('a.js-webform-tooltip-link').once('webform-tooltip-link').each(function () {
|
||||
$(this).tooltip();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, Drupal);
|
Reference in a new issue