Move all files to 2017/

This commit is contained in:
Oliver Davies 2025-09-29 22:25:17 +01:00
parent ac7370f67f
commit 2875863330
15717 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,36 @@
/**
* @file
* JavaScript behaviors for help.
*/
(function ($, Drupal) {
'use strict';
/**
* Handles disabling help dialog for mobile devices.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches the behavior for disabling help dialog for mobile devices.
*/
Drupal.behaviors.webformHelpDialog = {
attach: function (context) {
$(context).find('.button-webform-play').once('webform-help-dialog').on('click', function (event) {
if ($(window).width() < 768) {
event.stopImmediatePropagation();
}
}).each(function () {
// Must make sure that this click event handler is execute first and
// before the Ajax dialog handler.
// @see http://stackoverflow.com/questions/2360655/jquery-event-handlers-always-execute-in-order-they-were-bound-any-way-around-t
var handlers = $._data(this, 'events')['click'];
var handler = handlers.pop();
// Move it at the beginning.
handlers.splice(0, 0, handler);
});
}
};
})(jQuery, Drupal);