updated core to 8.6.1 via composer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
(function () {
|
||||
(function() {
|
||||
function findActiveStep(steps) {
|
||||
for (let i = 0; i < steps.length; i++) {
|
||||
if (steps[i].className === 'is-active') {
|
||||
@@ -26,4 +26,4 @@
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener('DOMContentLoaded', installStepsSetup);
|
||||
}
|
||||
}());
|
||||
})();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* This also supports collapsible navigable is the 'is-collapsible' class is
|
||||
* added to the main element, and a target element is included.
|
||||
*/
|
||||
(function ($, Drupal) {
|
||||
(function($, Drupal) {
|
||||
function init(i, tab) {
|
||||
const $tab = $(tab);
|
||||
const $target = $tab.find('[data-drupal-nav-tabs-target]');
|
||||
@@ -18,7 +18,8 @@
|
||||
function handleResize(e) {
|
||||
$tab.addClass('is-horizontal');
|
||||
const $tabs = $tab.find('.tabs');
|
||||
const isHorizontal = $tabs.outerHeight() <= $tabs.find('.tabs__tab').outerHeight();
|
||||
const isHorizontal =
|
||||
$tabs.outerHeight() <= $tabs.find('.tabs__tab').outerHeight();
|
||||
$tab.toggleClass('is-horizontal', isHorizontal);
|
||||
if (isCollapsible) {
|
||||
$tab.toggleClass('is-collapse-enabled', !isHorizontal);
|
||||
@@ -31,7 +32,9 @@
|
||||
$tab.addClass('position-container is-horizontal-enabled');
|
||||
|
||||
$tab.on('click.tabs', '[data-drupal-nav-tabs-trigger]', openMenu);
|
||||
$(window).on('resize.tabs', Drupal.debounce(handleResize, 150)).trigger('resize.tabs');
|
||||
$(window)
|
||||
.on('resize.tabs', Drupal.debounce(handleResize, 150))
|
||||
.trigger('resize.tabs');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,4 +51,4 @@
|
||||
}
|
||||
},
|
||||
};
|
||||
}(jQuery, Drupal));
|
||||
})(jQuery, Drupal);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Provides responsive behaviors to HTML details elements.
|
||||
*/
|
||||
|
||||
(function ($, Drupal) {
|
||||
(function($, Drupal) {
|
||||
/**
|
||||
* Initializes the responsive behaviors for details elements.
|
||||
*
|
||||
@@ -14,26 +14,27 @@
|
||||
*/
|
||||
Drupal.behaviors.responsiveDetails = {
|
||||
attach(context) {
|
||||
const $details = $(context).find('details').once('responsive-details');
|
||||
const $details = $(context)
|
||||
.find('details')
|
||||
.once('responsive-details');
|
||||
|
||||
if (!$details.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const $summaries = $details.find('> summary');
|
||||
|
||||
function detailsToggle(matches) {
|
||||
if (matches) {
|
||||
$details.attr('open', true);
|
||||
$summaries.attr('aria-expanded', true);
|
||||
$summaries.on('click.details-open', false);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// If user explicitly opened one, leave it alone.
|
||||
const $notPressed = $details
|
||||
.find('> summary[aria-pressed!=true]')
|
||||
.attr('aria-expanded', false);
|
||||
$notPressed
|
||||
.parent('details')
|
||||
.attr('open', false);
|
||||
$notPressed.parent('details').attr('open', false);
|
||||
// After resize, allow user to close previously opened details.
|
||||
$summaries.off('.details-open');
|
||||
}
|
||||
@@ -43,10 +44,9 @@
|
||||
detailsToggle(event.matches);
|
||||
}
|
||||
|
||||
const $summaries = $details.find('> summary');
|
||||
const mql = window.matchMedia('(min-width:48em)');
|
||||
mql.addListener(handleDetailsMQ);
|
||||
detailsToggle(mql.matches);
|
||||
},
|
||||
};
|
||||
}(jQuery, Drupal));
|
||||
})(jQuery, Drupal);
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
var $summaries = $details.find('> summary');
|
||||
|
||||
function detailsToggle(matches) {
|
||||
if (matches) {
|
||||
$details.attr('open', true);
|
||||
@@ -31,7 +33,6 @@
|
||||
detailsToggle(event.matches);
|
||||
}
|
||||
|
||||
var $summaries = $details.find('> summary');
|
||||
var mql = window.matchMedia('(min-width:48em)');
|
||||
mql.addListener(handleDetailsMQ);
|
||||
detailsToggle(mql.matches);
|
||||
|
||||
Reference in New Issue
Block a user