ldc-ovoteam/public/modules/contrib/webform/js/webform.admin.dropbutton.js
2024-02-06 10:27:42 +01:00

26 lines
631 B
JavaScript

/**
* @file
* Dropbutton feature.
*/
(function ($, Drupal) {
'use strict';
// Make sure that dropButton behavior exists.
if (!Drupal.behaviors.dropButton) {
return;
}
/**
* Wrap Drupal's dropbutton behavior so that the dropbutton widget is only visible after it is initialized.
*/
var dropButton = Drupal.behaviors.dropButton;
Drupal.behaviors.dropButton = {
attach: function (context, settings) {
dropButton.attach(context, settings);
$(context).find('.webform-dropbutton .dropbutton-wrapper').once('webform-dropbutton').css('visibility', 'visible');
}
};
})(jQuery, Drupal);