Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
61
web/modules/contrib/webform/js/webform.wizard.pages.js
Normal file
61
web/modules/contrib/webform/js/webform.wizard.pages.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* @file
|
||||
* JavaScript behaviors for webform wizard.
|
||||
*/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Link the wizard's previous pages.
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Links the wizard's previous pages.
|
||||
*/
|
||||
Drupal.behaviors.webformWizardPagesLink = {
|
||||
attach: function (context) {
|
||||
$('.js-webform-wizard-pages-links', context).once('webform-wizard-pages-links').each(function () {
|
||||
var $pages = $(this);
|
||||
var $form = $pages.closest('form');
|
||||
|
||||
var hasProgressLink = $pages.data('wizard-progress-link');
|
||||
var hasPreviewLink = $pages.data('wizard-preview-link');
|
||||
|
||||
$pages.find('.js-webform-wizard-pages-link').each(function () {
|
||||
var $button = $(this);
|
||||
var title = $button.attr('title');
|
||||
var page = $button.data('webform-page');
|
||||
|
||||
// Link progress marker and title.
|
||||
if (hasProgressLink) {
|
||||
var $progress = $form.find('.webform-progress [data-webform-page="' + page + '"]');
|
||||
$progress.find('.progress-marker, .progress-title')
|
||||
.attr({
|
||||
'role': 'link',
|
||||
'title': title,
|
||||
'aria-label': title
|
||||
})
|
||||
.click(function () {
|
||||
$button.click();
|
||||
});
|
||||
// Only allow the marker to be tabbable.
|
||||
$progress.find('.progress-marker').attr('tabindex', 0);
|
||||
}
|
||||
|
||||
// Move button to preview page div container with [data-webform-page].
|
||||
// @see \Drupal\webform\Plugin\WebformElement\WebformWizardPage::formatHtmlItem
|
||||
if (hasPreviewLink) {
|
||||
$form
|
||||
.find('.webform-preview [data-webform-page="' + page + '"]')
|
||||
.append($button)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, Drupal);
|
Reference in a new issue