Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
25
web/modules/contrib/webform/js/webform.contextual.js
Normal file
25
web/modules/contrib/webform/js/webform.contextual.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @file
|
||||
* JavaScript behavior to remove destination from contextual links.
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Bind click event to all .contextual links which are
|
||||
// dynamically inserted via Ajax.
|
||||
// @see webform_contextual_links_view_alter()
|
||||
// @see Drupal.behaviors.contextual
|
||||
$(document).on('click', '.contextual', function () {
|
||||
$(this).find('a.webform-contextual').once('webform-contextual').each(function () {
|
||||
this.href = this.href.split('?')[0];
|
||||
|
||||
// Add ?_webform_test={webform} to the current page's URL.
|
||||
if (/webform\/([^/]+)\/test/.test(this.href)) {
|
||||
this.href = window.location.pathname + '?_webform_test=' + RegExp.$1;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
Reference in a new issue