Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file
|
||||
* Javascript behaviors for details element.
|
||||
* JavaScript behaviors for details element.
|
||||
*/
|
||||
|
||||
(function ($, Drupal) {
|
||||
|
@ -22,12 +22,18 @@
|
|||
$('details > summary', context).once('webform-details-summary-save').click(function () {
|
||||
var $details = $(this).parent();
|
||||
|
||||
|
||||
// @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
|
||||
if ($details[0].hasAttribute('data-webform-details-nosave')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var name = Drupal.webformDetailsSaveGetName($details);
|
||||
if (!name) {
|
||||
return;
|
||||
}
|
||||
|
||||
var open = ($details.attr('open') != 'open') ? 1 : 0;
|
||||
var open = ($details.attr('open') !== 'open') ? '1' : '0';
|
||||
localStorage.setItem(name, open);
|
||||
});
|
||||
|
||||
|
@ -45,7 +51,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (open == 1) {
|
||||
if (open === '1') {
|
||||
$details.attr('open', 'open');
|
||||
}
|
||||
else {
|
||||
|
@ -59,10 +65,10 @@
|
|||
/**
|
||||
* Get the name used to store the state of details element.
|
||||
*
|
||||
* @param $details
|
||||
* @param {jQuery} $details
|
||||
* A details element.
|
||||
*
|
||||
* @returns string
|
||||
* @return {string}
|
||||
* The name used to store the state of details element.
|
||||
*/
|
||||
Drupal.webformDetailsSaveGetName = function ($details) {
|
||||
|
@ -91,12 +97,12 @@
|
|||
return '';
|
||||
}
|
||||
|
||||
// ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
|
||||
// identifier to webform ids and details ids. (ie my-form--FeSFISegTUI)
|
||||
// ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
|
||||
// identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI)
|
||||
// WORKAROUND: Remove the unique id that delimited using double dashes.
|
||||
formId = formId.replace(/--.+?$/, '').replace(/-/g, '_');
|
||||
detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_');
|
||||
return 'Drupal.webform.' + formId + '.' + detailsId;
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, Drupal);
|
||||
|
|
Reference in a new issue