diff --git a/js/webform.admin.js b/js/webform.admin.js index 8f01254060b36802190bec0bcb8e21d57b0f8952..c2783948766cb0bb02437343c2f12664e8a1fc48 100644 --- a/js/webform.admin.js +++ b/js/webform.admin.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformFilterAutocomplete = { - attach: function (context) { + attach(context) { $(once('webform-autocomplete', '.webform-filter-form input.form-autocomplete', context)) .each(function () { // If input value is an autocomplete match, reset the input to its @@ -37,7 +37,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTableRowHref = { - attach: function (context) { + attach(context) { // Only attach the click event handler to the entire table and determine // which row triggers the event. $(once('webform-results-table', '.webform-results-table', context)).on('click', function (event) { diff --git a/js/webform.ajax.js b/js/webform.ajax.js index dd4c59da5ddf88dde2ed1f03632d624a05a6a536..5b383f2881037587a8220d254233aa7e31b971e9 100644 --- a/js/webform.ajax.js +++ b/js/webform.ajax.js @@ -27,7 +27,7 @@ * Attaches the behavior to a.webform-ajax-link. */ Drupal.behaviors.webformAjaxLink = { - attach: function (context) { + attach(context) { $(once('webform-ajax-link', '.webform-ajax-link', context)).each(function () { var element_settings = {}; element_settings.progress = {type: 'fullscreen'}; @@ -68,7 +68,7 @@ * @see Drupal.behaviors.webformFormTabs */ Drupal.behaviors.webformAjaxHash = { - attach: function (context) { + attach(context) { $(once('webform-ajax-hash', '[data-hash]', context)).each(function () { var hash = $(this).data('hash'); if (hash) { @@ -89,7 +89,7 @@ * Attaches the behavior to confirmation back to link. */ Drupal.behaviors.webformConfirmationBackAjax = { - attach: function (context) { + attach(context) { $(once('webform-confirmation-back-ajax', '.js-webform-confirmation-back-link-ajax', context)) .on('click', function (event) { var $form = $(this).parents('form'); diff --git a/js/webform.announce.js b/js/webform.announce.js index 1259a68d5e3d386d03f96d24e478dbc2cd39d3d3..d16cc91c08348c764b57189a08909558be1f3006 100644 --- a/js/webform.announce.js +++ b/js/webform.announce.js @@ -21,7 +21,7 @@ * Attaches the behavior to [data-webform-announce] attribute. */ Drupal.behaviors.webformAnnounce = { - attach: function (context) { + attach(context) { $(once('data-webform-announce', '[data-webform-announce]', context)).each(function () { Drupal.announce($(this).data('webform-announce')); }); diff --git a/js/webform.confirmation.modal.js b/js/webform.confirmation.modal.js index 16bc65ff24e026d7a0bc0512d3a2607fe05c84af..ca1f631fb08b11787cc69f43daf3cc00e97b0072 100644 --- a/js/webform.confirmation.modal.js +++ b/js/webform.confirmation.modal.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformConfirmationModal = { - attach: function (context) { + attach(context) { $(once('webform-confirmation-modal', '.js-webform-confirmation-modal', context)).each(function () { var $element = $(this); diff --git a/js/webform.dialog.js b/js/webform.dialog.js index 00e84e21efafda08d4e1e738df960946c7f2f8ac..6e5c1f5aeb8f6c93d0e23e8868999a90ecd577d4 100644 --- a/js/webform.dialog.js +++ b/js/webform.dialog.js @@ -33,7 +33,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformDialog = { - attach: function (context) { + attach(context) { $(once('webform-dialog', 'a.webform-dialog', context)).each(function () { var $a = $(this); diff --git a/js/webform.element.ajax.js b/js/webform.element.ajax.js index 38f2013d245edca04c933b616931fd2acf04aceb..b423f5ce41ee933e612f49215abd8417179d8205 100644 --- a/js/webform.element.ajax.js +++ b/js/webform.element.ajax.js @@ -14,7 +14,7 @@ * Attaches form trigger submit events. */ Drupal.behaviors.webformSubmitTrigger = { - attach: function (context) { + attach(context) { $(once('webform-trigger-submit', '[data-webform-trigger-submit]')).on('change', function () { var submit = $(this).attr('data-webform-trigger-submit'); $(submit).trigger('mousedown'); diff --git a/js/webform.element.checkboxes.js b/js/webform.element.checkboxes.js index 48d8a36ae0727b42d55a64ed493617779aa1380a..9a8b40260c86f0445a4510d0b577df0ea57dbce1 100644 --- a/js/webform.element.checkboxes.js +++ b/js/webform.element.checkboxes.js @@ -13,7 +13,7 @@ * @see https://www.drupal.org/project/webform/issues/3068998 */ Drupal.behaviors.webformCheckboxesAllorNone = { - attach: function (context) { + attach(context) { $(once('webform-checkboxes-all-or-none', '[data-options-all], [data-options-none]', context)) .each(function () { var $element = $(this); diff --git a/js/webform.element.choices.js b/js/webform.element.choices.js index b3514e68bbea0b33fec0f33a0ddb6f9e3be49a39..50ab86d51e471f368f24a4a1296b8f74eda8188c 100644 --- a/js/webform.element.choices.js +++ b/js/webform.element.choices.js @@ -17,7 +17,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformChoices = { - attach: function (context) { + attach(context) { if (!window.Choices) { return; } diff --git a/js/webform.element.chosen.js b/js/webform.element.chosen.js index a98776a09eef89b1276b2fd5c1ac574450b882de..2da66bcb967edfea90bda50fa5f381e59cceb3f5 100644 --- a/js/webform.element.chosen.js +++ b/js/webform.element.chosen.js @@ -18,7 +18,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformChosen = { - attach: function (context) { + attach(context) { if (!$.fn.chosen) { return; } diff --git a/js/webform.element.codemirror.js b/js/webform.element.codemirror.js index f295481a6a3f717b042cd9de23b38b579e7df6b1..63526659f65c8aca82a153c0eae38c2b7fa88295 100644 --- a/js/webform.element.codemirror.js +++ b/js/webform.element.codemirror.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCodeMirror = { - attach: function (context) { + attach(context) { if (!window.CodeMirror) { return; } diff --git a/js/webform.element.color.js b/js/webform.element.color.js index 13550cba46008caced7894ce202ca097b4b8aed1..713772f86c5ecc7d8606311d257395f583695a58 100644 --- a/js/webform.element.color.js +++ b/js/webform.element.color.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformColor = { - attach: function (context) { + attach(context) { $(once('webform-color', '.form-color:not(.form-color-output)', context)).each(function () { var $element = $(this); // Display color input's output w/ visually-hidden label to diff --git a/js/webform.element.composite.js b/js/webform.element.composite.js index 86d13631e4692b60bec8f9e302897c17430b597c..e3255c626946cd66c2e3dc998dc8922cef750c66 100644 --- a/js/webform.element.composite.js +++ b/js/webform.element.composite.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformElementComposite = { - attach: function (context) { + attach(context) { $(once('webform-composite-types', '[data-composite-types]')).each(function () { var $element = $(this); var $type = $element.closest('tr').find('.js-webform-composite-type'); diff --git a/js/webform.element.computed.js b/js/webform.element.computed.js index e07da7acf74e35dc4d8c80cb380ef03c6b1f8618..5b9b6d64139fe88eb54f29fb41393a5a86aa9e72 100644 --- a/js/webform.element.computed.js +++ b/js/webform.element.computed.js @@ -17,7 +17,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformComputed = { - attach: function (context) { + attach(context) { // Find computed elements and build trigger selectors. $(once('webform-computed', '.js-webform-computed', context)).each(function () { // Get computed element and form. diff --git a/js/webform.element.counter.js b/js/webform.element.counter.js index 1cb13fe00b1a168bd151c854ed2ac8ee2cae4f13..74ad455d94e5dbed04c59dc9ff1165da489eb097 100644 --- a/js/webform.element.counter.js +++ b/js/webform.element.counter.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCounter = { - attach: function (context) { + attach(context) { if (!$.fn.textcounter) { return; } diff --git a/js/webform.element.details.js b/js/webform.element.details.js index 9213f0a6c9d87cda73068e133983c9a1f6652b7f..26c6a38ec63d90ed35e6a2dfa8d7ad92c53ecc36 100644 --- a/js/webform.element.details.js +++ b/js/webform.element.details.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformDetailsInvalid = { - attach: function (context) { + attach(context) { $('details :input', context).on('invalid', function () { $(this).parents('details:not([open])').children('summary').trigger('click'); diff --git a/js/webform.element.details.save.js b/js/webform.element.details.save.js index 8892449a947e321cc26978444befd66d639b6bc0..b3f63b05169954ba8885afbd19618975ac1ebf1d 100644 --- a/js/webform.element.details.save.js +++ b/js/webform.element.details.save.js @@ -25,7 +25,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformDetailsSave = { - attach: function (context) { + attach(context) { if (!hasLocalStorage) { return; } diff --git a/js/webform.element.details.toggle.js b/js/webform.element.details.toggle.js index 74d7478f082e478bc10e7069a7e6540c25019515..a192dec5462014bfa4638da64128029c045a9a8a 100644 --- a/js/webform.element.details.toggle.js +++ b/js/webform.element.details.toggle.js @@ -15,7 +15,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformDetailsToggle = { - attach: function (context) { + attach(context) { $(once('webform-details-toggle', '.js-webform-details-toggle', context)).each(function () { var $form = $(this); var $tabs = $form.find('.webform-tabs'); diff --git a/js/webform.element.excluded_elements.js b/js/webform.element.excluded_elements.js index e9c646529a661856cef3e40d2e800994ae98f9f9..9e9d14db133e9aee2a8795ea9d2d90462e50b6e5 100644 --- a/js/webform.element.excluded_elements.js +++ b/js/webform.element.excluded_elements.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformExcludedElementsComposite = { - attach: function (context) { + attach(context) { $(once('webform-excluded-elements', '.form-type-webform-excluded-elements [data-composite] input[type="checkbox"]')) .on('click', function () { var checked = this.checked; diff --git a/js/webform.element.help.js b/js/webform.element.help.js index 5e72cdb1d2a9445b30d9ac66fe781668084f48af..6e20875453b13655c8ec79823dfdb979881cc67e 100644 --- a/js/webform.element.help.js +++ b/js/webform.element.help.js @@ -17,7 +17,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformElementHelpIcon = { - attach: function (context) { + attach(context) { if (!window.tippy) { return; } diff --git a/js/webform.element.image_file.modal.js b/js/webform.element.image_file.modal.js index 57bfbaf85add7a75d6788d58d0f0d6af2ae10cd9..79c84d9bbc0fd26630f796ce3106b491b64a49d9 100644 --- a/js/webform.element.image_file.modal.js +++ b/js/webform.element.image_file.modal.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformImageFileModal = { - attach: function (context) { + attach(context) { $(once('webform-image-file-modal', '.js-webform-image-file-modal', context)).on('click', function () { // http://stackoverflow.com/questions/11442712/get-width-height-of-remote-image-from-url var img = new Image(); diff --git a/js/webform.element.inputhide.js b/js/webform.element.inputhide.js index 642d18ce8468fb4c70ea7b2e5caaad2914a29c99..e5993173c7103de8c8606c06c441388bd386b9ad 100644 --- a/js/webform.element.inputhide.js +++ b/js/webform.element.inputhide.js @@ -13,7 +13,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformInputHide = { - attach: function (context) { + attach(context) { // Apply chrome fix to prevent password input from being autofilled. // @see https://stackoverflow.com/questions/15738259/disabling-chrome-autofill if (isChrome) { diff --git a/js/webform.element.inputmask.js b/js/webform.element.inputmask.js index ba26e39673ab719bdca2d8f9008238b802c56c5e..71ce6016a0b4f4288a7054f80b09258b9c5b81ad 100644 --- a/js/webform.element.inputmask.js +++ b/js/webform.element.inputmask.js @@ -78,7 +78,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformInputMask = { - attach: function (context) { + attach(context) { if (!$.fn.inputmask) { return; } diff --git a/js/webform.element.message.js b/js/webform.element.message.js index 6c10820db14f1b01803db52d503b47fc068c4bc2..9961a725e87b398e738e01426dc3024b297162fb 100644 --- a/js/webform.element.message.js +++ b/js/webform.element.message.js @@ -39,7 +39,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformMessageClose = { - attach: function (context) { + attach(context) { $(once('webform-message--close', '.js-webform-message--close', context)).each(function () { var $element = $(this); diff --git a/js/webform.element.more.js b/js/webform.element.more.js index 0fc3406e0eab964755264a5747e4cce1679e40fa..8921f1c0e420898b25dc5a289b741b586137360f 100644 --- a/js/webform.element.more.js +++ b/js/webform.element.more.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformElementMore = { - attach: function (context) { + attach(context) { $(once('webform-element-more', '.js-webform-element-more', context)).each(function (event) { var $more = $(this); var $a = $more.find('a').first(); diff --git a/js/webform.element.options.admin.js b/js/webform.element.options.admin.js index 1c8a27a1685603a02d8d1374bfaddb91fadbfef8..5453d7376733ffaf02535a23ea47a20e126c4f6c 100644 --- a/js/webform.element.options.admin.js +++ b/js/webform.element.options.admin.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformOptionsAdmin = { - attach: function (context) { + attach(context) { $(once('webform-options-sync', '.js-webform-options-sync', context)).each(function () { // Target input name and not id because the id will be changing via // Ajax callbacks. diff --git a/js/webform.element.options.js b/js/webform.element.options.js index fac1f24992a1eb6df4d3fa3ecadb160922c9db41..6fa202c324f6f9e2f38029d6070bdced01ea2f4a 100644 --- a/js/webform.element.options.js +++ b/js/webform.element.options.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformOptionsButtons = { - attach: function (context) { + attach(context) { // Place <input> inside of <label> before the label. $(context).find('label.webform-options-display-buttons-label > input[type="checkbox"], label.webform-options-display-buttons-label > input[type="radio"]').each(function () { var $input = $(this); diff --git a/js/webform.element.other.js b/js/webform.element.other.js index 37118b832dbf569ec1e6cfd07a61bedd490b6a85..a88ca7a6468f5129e43e2325f6bc798c49b0b101 100644 --- a/js/webform.element.other.js +++ b/js/webform.element.other.js @@ -71,7 +71,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformSelectOther = { - attach: function (context) { + attach(context) { $(once('webform-select-other', '.js-webform-select-other', context)).each(function () { var $element = $(this); @@ -99,7 +99,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCheckboxesOther = { - attach: function (context) { + attach(context) { $(once('webform-checkboxes-other', '.js-webform-checkboxes-other', context)).each(function () { var $element = $(this); var $checkbox = $element.find('input[value="_other_"]'); @@ -120,7 +120,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformRadiosOther = { - attach: function (context) { + attach(context) { $(once('webform-radios-other', '.js-webform-radios-other', context)).each(function () { var $element = $(this); @@ -142,7 +142,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformButtonsOther = { - attach: function (context) { + attach(context) { $(once('webform-buttons-other', '.js-webform-buttons-other', context)).each(function () { var $element = $(this); diff --git a/js/webform.element.range.js b/js/webform.element.range.js index c1a3d555584832c6d9e58e26b4b73bc20af448f5..a58134fe5b3f9c5f8719a063806422a93ac6bd59 100644 --- a/js/webform.element.range.js +++ b/js/webform.element.range.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformRangeOutputNumber = { - attach: function (context) { + attach(context) { $(once('webform-range-output-number', '.js-form-type-range', context)).each(function () { var $element = $(this); var $input = $element.find('input[type="range"]'); @@ -43,7 +43,7 @@ * @see https://stackoverflow.com/questions/33794123/absolute-positioning-in-relation-to-a-inputtype-range */ Drupal.behaviors.webformRangeOutputBubble = { - attach: function (context) { + attach(context) { $(once('webform-range-output-bubble', '.js-form-type-range', context)).each(function () { var $element = $(this); var $input = $element.find('input[type="range"]'); diff --git a/js/webform.element.rating.js b/js/webform.element.rating.js index 5ea52ccd769ffaa4ad6c94dcfec5b724019e7e71..47bf207c20b8132ec7e226897dbe04f2f748a12c 100644 --- a/js/webform.element.rating.js +++ b/js/webform.element.rating.js @@ -14,7 +14,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformRating = { - attach: function (context) { + attach(context) { $(once('webform-rating', '[data-rateit-backingfld]', context)) .each(function () { var $rateit = $(this); diff --git a/js/webform.element.roles.js b/js/webform.element.roles.js index a51751f9ba8f1f4929d4661e05dff8233fed8957..430b75ab649c69ff671067601fd8c951c47c151a 100644 --- a/js/webform.element.roles.js +++ b/js/webform.element.roles.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformRoles = { - attach: function (context) { + attach(context) { $(once('webform-roles', '.js-webform-roles-role[value="authenticated"]', context)).each(function () { var $authenticated = $(this); var $checkboxes = $authenticated.parents('.form-checkboxes').find('.js-webform-roles-role').filter(function () { diff --git a/js/webform.element.select.js b/js/webform.element.select.js index 34aed31e4098badbe06118ba0b8467c8f4fb1a08..c4159dc9bd3805664962c8b4bc622321e67581d3 100644 --- a/js/webform.element.select.js +++ b/js/webform.element.select.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformSelectOptionsDisabled = { - attach: function (context) { + attach(context) { $(once('webform-select-options-disabled', 'select[data-webform-select-options-disabled]', context)).each(function () { var $select = $(this); var disabled = $select.attr('data-webform-select-options-disabled').split(/\s*,\s*/); diff --git a/js/webform.element.select2.js b/js/webform.element.select2.js index 496245f894a69051479615d29dedea33cc29e9f6..69da7afb3c13bb75e52bd7bdd06772cd590ed8d5 100644 --- a/js/webform.element.select2.js +++ b/js/webform.element.select2.js @@ -31,7 +31,7 @@ if (!jQuery.trim) { * @type {Drupal~behavior} */ Drupal.behaviors.webformSelect2 = { - attach: function (context) { + attach(context) { if (!$.fn.select2) { return; } diff --git a/js/webform.element.signature.js b/js/webform.element.signature.js index f966e39f94045a0c297338c7f347653e8d61ce9a..3112da88ccd27fdcf8a3f05d06fec2d6dbf863da 100644 --- a/js/webform.element.signature.js +++ b/js/webform.element.signature.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformSignature = { - attach: function (context) { + attach(context) { if (!window.SignaturePad) { return; } diff --git a/js/webform.element.states.js b/js/webform.element.states.js index 33ed175b4a5f79b19c938c810684a62237acd185..8e7bd9f5744ef288871b3fea2c21db113695f79b 100644 --- a/js/webform.element.states.js +++ b/js/webform.element.states.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformElementStates = { - attach: function (context) { + attach(context) { $(once('webform-element-states-condition', '.webform-states-table--condition', context)).each(function () { var $condition = $(this); var $selector = $condition.find('.webform-states-table--selector select'); diff --git a/js/webform.element.tableselect.js b/js/webform.element.tableselect.js index 7d10712992150f263109adebceb4ad49e5f0dbbe..236bf03542ea61683061a99655ebe41e02b231e2 100644 --- a/js/webform.element.tableselect.js +++ b/js/webform.element.tableselect.js @@ -13,7 +13,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTableSelect = { - attach: function (context) { + attach(context) { $(once('webform-tableselect', 'table.js-webform-tableselect', context)) .each(Drupal.webformTableSelect); } diff --git a/js/webform.element.telephone.js b/js/webform.element.telephone.js index 4a9333f8e872c3004f40cfaa38556f8f5f8d5061..0ce32610f336160217c786997017bf4d7e23f457 100644 --- a/js/webform.element.telephone.js +++ b/js/webform.element.telephone.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTelephoneInternational = { - attach: function (context) { + attach(context) { if (!$.fn.intlTelInput) { return; } diff --git a/js/webform.element.terms_of_service.js b/js/webform.element.terms_of_service.js index 885f7c0b13d3c935f5d61583ef351251be8e88d4..2606146368740ba46156aeeb6ed35ab5c9eae58d 100644 --- a/js/webform.element.terms_of_service.js +++ b/js/webform.element.terms_of_service.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTermsOfService = { - attach: function (context) { + attach(context) { $(once('webform-terms-of-service', '.js-form-type-webform-terms-of-service', context)).each(function () { var $element = $(this); var $a = $element.find('label a'); diff --git a/js/webform.element.text_format.js b/js/webform.element.text_format.js index a877f5845ca62c4cb4454594c45dea8e0241661f..23404f0c440d10a7f8ef932fa7fafdcd570c3d53 100644 --- a/js/webform.element.text_format.js +++ b/js/webform.element.text_format.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTextFormat = { - attach: function (context) { + attach(context) { $(once('webform-text-format', '.js-text-format-wrapper textarea', context)).each(function () { if (!window.CKEDITOR) { return; diff --git a/js/webform.form.auto_focus.js b/js/webform.form.auto_focus.js index 17695a5c3be948f5b28317a0b50fc3eb34856755..1ef17ff3ee4d8d936dc77ca24767881b107712e5 100644 --- a/js/webform.form.auto_focus.js +++ b/js/webform.form.auto_focus.js @@ -14,7 +14,7 @@ * Attaches the behavior for the webform autofocusing. */ Drupal.behaviors.webformAutofocus = { - attach: function (context) { + attach(context) { $(context).find('.js-webform-autofocus :input:visible:enabled:first') .trigger('focus'); } diff --git a/js/webform.form.js b/js/webform.form.js index 11704f40944d5fbd52535d4be1ab7ab30410f86f..e1e852bdc43954912807fd2fe165146cc1df083b 100644 --- a/js/webform.form.js +++ b/js/webform.form.js @@ -37,7 +37,7 @@ * not by pressing Enter. */ Drupal.behaviors.webformDisableAutoSubmit = { - attach: function (context) { + attach(context) { // Not using context so that inputs loaded via Ajax will have autosubmit // disabled. // @see http://stackoverflow.com/questions/11235622/jquery-disable-form-submit-on-enter @@ -63,7 +63,7 @@ * @see http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message **/ Drupal.behaviors.webformRequiredError = { - attach: function (context) { + attach(context) { $(once('webform-required-error', $(context).find(':input[data-webform-required-error], :input[data-webform-pattern-error]'))) .on('invalid', function () { this.setCustomValidity(''); diff --git a/js/webform.form.submit_once.js b/js/webform.form.submit_once.js index b434450487082496fb13e3f39f98429d26325e82..bb513f11c499fd1ebd19192cf2557b7a571799f1 100644 --- a/js/webform.form.submit_once.js +++ b/js/webform.form.submit_once.js @@ -20,7 +20,7 @@ $form.find('.js-webform-wizard-pages-links :submit, .form-actions :submit').removeClass('is-disabled'); $form.find('.form-actions .ajax-progress.ajax-progress-throbber').remove(); }, - attach: function (context) { + attach(context) { $(once('webform-submit-once', '.js-webform-submit-once', context)).each(function () { var $form = $(this); // Remove data-webform-submitted. diff --git a/js/webform.form.tabs.js b/js/webform.form.tabs.js index 5eeed32806468afbe27f1c6541116836979e3c08..3282db2be132c8016c9c9dbbf705c799c4ae4266 100644 --- a/js/webform.form.tabs.js +++ b/js/webform.form.tabs.js @@ -21,7 +21,7 @@ * @see \Drupal\webform\Utility\WebformFormHelper::buildTabs */ Drupal.behaviors.webformFormTabs = { - attach: function (context) { + attach(context) { if (!window.Tabby) { return; } diff --git a/js/webform.form.unsaved.js b/js/webform.form.unsaved.js index a49ea6269b5fddc55a64d07925560bf137289a79..b284ed9d141c7d5b55c67a7035e2187006e4dae2 100644 --- a/js/webform.form.unsaved.js +++ b/js/webform.form.unsaved.js @@ -29,7 +29,7 @@ // Set the current unsaved flag state. unsaved = value; }, - attach: function (context) { + attach(context) { // Look for the 'data-webform-unsaved' attribute which indicates that // a multi-step webform has unsaved data. // @see \Drupal\webform\WebformSubmissionForm::buildForm diff --git a/js/webform.help.js b/js/webform.help.js index 392038c4e05b5f3b1c1347bf4527e57988429667..578a56fef34059b221997b9c2ca743337c1f580c 100644 --- a/js/webform.help.js +++ b/js/webform.help.js @@ -14,7 +14,7 @@ * Attaches the behavior for disabling help dialog for mobile devices. */ Drupal.behaviors.webformHelpDialog = { - attach: function (context) { + attach(context) { $(once('webform-help-dialog', '.button-webform-play', context)).on('click', function (event) { if ($(window).width() < 768) { event.stopImmediatePropagation(); diff --git a/js/webform.states.js b/js/webform.states.js index 05ae9521c182e08b9de2322f92948e30ffd9dcf7..94d93b308644759f9b6078ba5dddf2211d7435f0 100644 --- a/js/webform.states.js +++ b/js/webform.states.js @@ -320,7 +320,7 @@ * @see https://www.drupal.org/project/webform/issues/3068998 */ Drupal.behaviors.webformCheckboxesRequired = { - attach: function (context) { + attach(context) { $(once('webform-checkboxes-required', '.js-form-type-checkboxes.required, .webform-term-checkboxes.required, .js-form-type-webform-checkboxes-other.required, .js-webform-type-checkboxes.required, .js-webform-type-webform-checkboxes-other.required, .js-webform-type-webform-radios-other.checkboxes', context)) .each(function () { var $element = $(this); @@ -338,7 +338,7 @@ * @see https://www.drupal.org/project/webform/issues/2856795 */ Drupal.behaviors.webformRadiosRequired = { - attach: function (context) { + attach(context) { $(once('webform-radios-required', '.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .js-webform-type-webform-scale', context)) .each(function () { var $element = $(this); @@ -355,7 +355,7 @@ * @see https://www.drupal.org/project/webform/issues/2856795 */ Drupal.behaviors.webformTableSelectRequired = { - attach: function (context) { + attach(context) { $(once('webform-tableselect-required','.js-webform-tableselect.required', context)) .each(function () { var $element = $(this); diff --git a/js/webform.tooltip.js b/js/webform.tooltip.js index ee266a136c7f83ba0d27b48609bec02ed3e1d006..046f7cc581c4865fe5a140f72fc548a53b54fe04 100644 --- a/js/webform.tooltip.js +++ b/js/webform.tooltip.js @@ -24,7 +24,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTooltipElement = { - attach: function (context) { + attach(context) { if (!window.tippy) { return; } @@ -61,7 +61,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformTooltipLink = { - attach: function (context) { + attach(context) { if (!window.tippy) { return; } diff --git a/js/webform.wizard.pages.js b/js/webform.wizard.pages.js index 762cd09c1295f4f84e1af6cacd382c9b7331944b..a6c4ec0fde3b39f8c94e48aaf907b7ffa0da162d 100644 --- a/js/webform.wizard.pages.js +++ b/js/webform.wizard.pages.js @@ -14,7 +14,7 @@ * Links the wizard's previous pages. */ Drupal.behaviors.webformWizardPagesLink = { - attach: function (context) { + attach(context) { $(once('webform-wizard-pages-links', '.js-webform-wizard-pages-links', context)).each(function () { var $pages = $(this); var $form = $pages.closest('form'); diff --git a/js/webform.wizard.track.js b/js/webform.wizard.track.js index 7cb0eb5f4571aae6213dbbf3345959d3c8e8f0a0..8ea2edca13956d8f75c98fb75290d0321265059e 100644 --- a/js/webform.wizard.track.js +++ b/js/webform.wizard.track.js @@ -14,7 +14,7 @@ * Tracks the wizard's current page in the URL. */ Drupal.behaviors.webformWizardTrackPage = { - attach: function (context) { + attach(context) { // Make sure on page load or Ajax refresh the browser's URL ?page= query // parameter is correct since conditional logic can skip pages. // Note: window.history is only supported by IE 10+. diff --git a/modules/webform_access/js/webform_access.admin.js b/modules/webform_access/js/webform_access.admin.js index b22a3f35e298bb58e8437dfd2d8f26b38cfef450..2cdd2f226af2994302f12853daf168afe73d740d 100644 --- a/modules/webform_access/js/webform_access.admin.js +++ b/modules/webform_access/js/webform_access.admin.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformAccessGroupPermissions = { - attach: function (context) { + attach(context) { $(once('webform-access-group-permissions', '#edit-permissions', context)).each(function () { var $permissions = $(this); var $checkbox = $permissions.find('input[name="permissions[administer]"]'); diff --git a/modules/webform_cards/js/webform_cards.admin.js b/modules/webform_cards/js/webform_cards.admin.js index 0dcd7a6ad5ac0e3fef64e2c3be02b9883b82c316..b434de1492bd2ec0c22a1d14324a614e5b7a6913 100644 --- a/modules/webform_cards/js/webform_cards.admin.js +++ b/modules/webform_cards/js/webform_cards.admin.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCardsAdmin = { - attach: function (context) { + attach(context) { // Determine if the form is the context or it is within the context. var $forms = $(context).is('form.webform-edit-form') ? $(context) diff --git a/modules/webform_cards/js/webform_cards.js b/modules/webform_cards/js/webform_cards.js index a6ede2008171e11d88aca9257efe926fcc66a331..07d76087c8616c11352abd528f1cdd19d7bcd1b2 100644 --- a/modules/webform_cards/js/webform_cards.js +++ b/modules/webform_cards/js/webform_cards.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCards = { - attach: function (context) { + attach(context) { // Determine if the form is the context or it is within the context. var $forms = $(context).is('form.webform-submission-form') ? $(context) diff --git a/modules/webform_cards/js/webform_cards.test.js b/modules/webform_cards/js/webform_cards.test.js index b7571113ac211f35c98921c1418d3f6109d80b38..11c8df3fcf627f9ae43841c7b1c10e2ccfedf034 100644 --- a/modules/webform_cards/js/webform_cards.test.js +++ b/modules/webform_cards/js/webform_cards.test.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformCardsTest = { - attach: function (context) { + attach(context) { $(once('webform-card-test-submit-form', '.js-webform-card-test-submit-form', context)).on('click', function () { var selector = $(this).attr('href').replace('#', '.') + ' .webform-button--submit'; $(selector).trigger('click'); diff --git a/modules/webform_cards/tests/modules/webform_cards_test/config/install/webform.webform.test_cards_javascript.yml b/modules/webform_cards/tests/modules/webform_cards_test/config/install/webform.webform.test_cards_javascript.yml index c07f3528d69ca696ce0565a81aad1d3aa563282c..0ea96d70d215a6d6a58ea179820381b34e4ded03 100644 --- a/modules/webform_cards/tests/modules/webform_cards_test/config/install/webform.webform.test_cards_javascript.yml +++ b/modules/webform_cards/tests/modules/webform_cards_test/config/install/webform.webform.test_cards_javascript.yml @@ -40,7 +40,7 @@ javascript: | 'use strict'; Drupal.behaviors.webformCardsTestJavaScript = { - attach: function (context) { + attach(context) { var $forms = $(context).is('form.webform-submission-form') ? $(context) : $('form.webform-submission-form', context); diff --git a/modules/webform_clientside_validation/js/webform_clientside_validation.ife.js b/modules/webform_clientside_validation/js/webform_clientside_validation.ife.js index 0eba8b63c3838a517e1608c4384d54a2551fe85c..4963cae0b87e12cd49b28b91c1a47de2f564eed0 100644 --- a/modules/webform_clientside_validation/js/webform_clientside_validation.ife.js +++ b/modules/webform_clientside_validation/js/webform_clientside_validation.ife.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformClientSideValidationAjax = { - attach: function (context) { + attach(context) { $(once('webform-clientside-validation-ajax', 'form.webform-submission-form .form-actions input[type="submit"]:not([formnovalidate])')) .addClass('cv-validate-before-ajax'); } @@ -30,7 +30,7 @@ * @see https://github.com/jquery-validation/jquery-validation/pull/2119/commits */ Drupal.behaviors.webformClientSideValidationDateTimeFix = { - attach: function (context) { + attach(context) { $(context).find(':input[type="date"], :input[type="time"], :input[type="datetime"]') .removeAttr('step') .removeAttr('min') diff --git a/modules/webform_clientside_validation/js/webform_clientside_validation.novalidate.js b/modules/webform_clientside_validation/js/webform_clientside_validation.novalidate.js index 381dae9ad1e559cb47ed3bdd56350f19b01efadf..fb0380b01c7c216a16c6c6e9a12717739a172888 100644 --- a/modules/webform_clientside_validation/js/webform_clientside_validation.novalidate.js +++ b/modules/webform_clientside_validation/js/webform_clientside_validation.novalidate.js @@ -10,7 +10,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformClientSideValidationNoValidation = { - attach: function (context) { + attach(context) { $(once('webformClientSideValidationNoValidate', 'form[data-webform-clientside-validation-novalidate]', context)) .each(function () { $(this).validate().destroy(); diff --git a/modules/webform_icheck/js/webform_icheck.element.js b/modules/webform_icheck/js/webform_icheck.element.js index 1e916bea6a4ac2a5348ab345cd6f2919c2ae582c..b6cd14a3b951ef6389741bb69b40849906ce5ca7 100644 --- a/modules/webform_icheck/js/webform_icheck.element.js +++ b/modules/webform_icheck/js/webform_icheck.element.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformICheck = { - attach: function (context) { + attach(context) { if (!$.fn.iCheck) { return; } @@ -62,7 +62,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformICheckTableSelectAll = { - attach: function (context) { + attach(context) { if (!$.fn.iCheck) { return; } diff --git a/modules/webform_image_select/js/webform_image_select.element.js b/modules/webform_image_select/js/webform_image_select.element.js index 655a8eec2c46113cea5f3b3298ced7878568ead3..b5a344f3e4fa2db97c5fe47c57b214c5cdad8dcd 100644 --- a/modules/webform_image_select/js/webform_image_select.element.js +++ b/modules/webform_image_select/js/webform_image_select.element.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformImageSelect = { - attach: function (context) { + attach(context) { if (!$.fn.imagepicker) { return; } diff --git a/modules/webform_jqueryui_buttons/js/webform_jqueryui_buttons.element.js b/modules/webform_jqueryui_buttons/js/webform_jqueryui_buttons.element.js index 53e8122f281aef8e33bfeef44144f2450c28fb6c..deda617634fef54ac223359d8e48b89e8f9f00a5 100644 --- a/modules/webform_jqueryui_buttons/js/webform_jqueryui_buttons.element.js +++ b/modules/webform_jqueryui_buttons/js/webform_jqueryui_buttons.element.js @@ -20,7 +20,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformButtons = { - attach: function (context) { + attach(context) { $(once('webform-buttons', Drupal.webform.buttons.selector, context)).each(function () { var $buttons = $(this); diff --git a/modules/webform_location_geocomplete/js/webform_location_geocomplete.element.js b/modules/webform_location_geocomplete/js/webform_location_geocomplete.element.js index bcd0b4e60647a0d0d0f46b57fa548e2fb4172ccc..1bca82d0e6685cf0b0197de44c83ea0fb5e1c9b6 100644 --- a/modules/webform_location_geocomplete/js/webform_location_geocomplete.element.js +++ b/modules/webform_location_geocomplete/js/webform_location_geocomplete.element.js @@ -17,7 +17,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformLocationGeocomplete = { - attach: function (context) { + attach(context) { if (!$.fn.geocomplete) { return; } diff --git a/modules/webform_location_places/js/webform.element.location.places.js b/modules/webform_location_places/js/webform.element.location.places.js index f16e438da76f2bb5ef35430ab8fe07e89f547158..1f3037d3106ce78f2fb4dd903054de761c91e522 100644 --- a/modules/webform_location_places/js/webform.element.location.places.js +++ b/modules/webform_location_places/js/webform.element.location.places.js @@ -31,7 +31,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformLocationPlaces = { - attach: function (context) { + attach(context) { if (!window.places) { return; } diff --git a/modules/webform_options_custom/js/webform_options_custom.element.js b/modules/webform_options_custom/js/webform_options_custom.element.js index df4b192236e5f851d9884ad6e137f5fedd559be9..830ef7ff75d11f8490d820d838a81585b21467ff 100644 --- a/modules/webform_options_custom/js/webform_options_custom.element.js +++ b/modules/webform_options_custom/js/webform_options_custom.element.js @@ -35,7 +35,7 @@ * Attaches the behavior for the block settings summaries. */ Drupal.behaviors.webformOptionsCustom = { - attach: function (context) { + attach(context) { $(once('webform-options-custom', '.js-webform-options-custom', context)).each(function () { var $element = $(this); var $select = $element.find('select'); diff --git a/modules/webform_share/js/webform_share.admin.js b/modules/webform_share/js/webform_share.admin.js index 78db9fee32155086985622c8d8f66b9043cdbb33..87035545f379a4eb41835f4b9da2ff4cd5931ef5 100644 --- a/modules/webform_share/js/webform_share.admin.js +++ b/modules/webform_share/js/webform_share.admin.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformShareAdminCopy = { - attach: function (context) { + attach(context) { $(once('webform-share-admin-copy', '.js-webform-share-admin-copy', context)).each(function () { var $container = $(this); var $textarea = $container.find('textarea'); diff --git a/modules/webform_submission_export_import/tests/modules/webform_submission_export_import_test/js/webform_submission_export_import_test.js b/modules/webform_submission_export_import/tests/modules/webform_submission_export_import_test/js/webform_submission_export_import_test.js index d99f65536348436ca69c3457e147593963ce8fbb..0ea5137e081998dbef0b06d68001d7fef75c9f73 100644 --- a/modules/webform_submission_export_import/tests/modules/webform_submission_export_import_test/js/webform_submission_export_import_test.js +++ b/modules/webform_submission_export_import/tests/modules/webform_submission_export_import_test/js/webform_submission_export_import_test.js @@ -11,7 +11,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformSubmissionExportImportTest = { - attach: function (context) { + attach(context) { $(once('webform-export-import-test', '#edit-import-url--description a', context)) .on('click', function () { $('#edit-import-url').val(this.href); diff --git a/modules/webform_toggles/js/webform_toggles.element.js b/modules/webform_toggles/js/webform_toggles.element.js index 087137018c6ec3cd31e28d5af98cd6ff09e4f0dd..a28a5312dba2ce51d8aaa17522df41f7cc8ff654 100644 --- a/modules/webform_toggles/js/webform_toggles.element.js +++ b/modules/webform_toggles/js/webform_toggles.element.js @@ -16,7 +16,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformToggle = { - attach: function (context) { + attach(context) { if (!$.fn.toggles) { return; } diff --git a/modules/webform_ui/js/webform_ui.js b/modules/webform_ui/js/webform_ui.js index 446435df19027c4b9f3d7be281083b60d21f4f97..70e4faaa94a56a5d509cd22aae99becdd57c08d9 100644 --- a/modules/webform_ui/js/webform_ui.js +++ b/modules/webform_ui/js/webform_ui.js @@ -124,7 +124,7 @@ * @type {Drupal~behavior} */ Drupal.behaviors.webformUiElementKey = { - attach: function (context) { + attach(context) { if (!drupalSettings.webform_ui || !drupalSettings.webform_ui.reserved_keys || !$(context).find(':input[name="key"]').length) {