Loading js/webform.admin.dropbutton.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Dropbutton feature. */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -19,8 +19,8 @@ Drupal.behaviors.dropButton = { attach: function (context, settings) { dropButton.attach(context, settings); $(context).find('.webform-dropbutton .dropbutton-wrapper').once('webform-dropbutton').css('visibility', 'visible'); $(once('webform-dropbutton', '.webform-dropbutton .dropbutton-wrapper', context)).css('visibility', 'visible'); } }; })(jQuery, Drupal); })(jQuery, Drupal, once); js/webform.admin.js +4 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for admin pages. */ (function ($, Drupal, debounce) { (function ($, Drupal, debounce, once) { 'use strict'; Loading @@ -14,7 +14,7 @@ */ Drupal.behaviors.webformFilterAutocomplete = { attach: function (context) { $('.webform-filter-form input.form-autocomplete', context).once('webform-autocomplete') $(once('webform-autocomplete', '.webform-filter-form input.form-autocomplete', context)) .each(function () { // If input value is an autocomplete match, reset the input to its // default value. Loading Loading @@ -42,7 +42,7 @@ attach: function (context) { // Only attach the click event handler to the entire table and determine // which row triggers the event. $('.webform-results-table', context).once('webform-results-table').on('click', function (event) { $(once('webform-results-table', '.webform-results-table', context)).on('click', function (event) { if (event.target.tagName === 'A' || event.target.tagName === 'BUTTON' || event.target.tagName === 'INPUT') { return true; } Loading Loading @@ -70,4 +70,4 @@ } }; })(jQuery, Drupal, Drupal.debounce); })(jQuery, Drupal, Drupal.debounce, once); js/webform.admin.off-canvas.js +15 −13 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * @see misc/dialog/off-canvas.js */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -21,7 +21,8 @@ attach: function () { // Resize seven.theme tabs when off-canvas dialog opened and closed. // @see core/themes/seven/js/nav-tabs.js $(window).once('webform-off-canvas').on({ if(once('webform-off-canvas', 'html').length) { $(window).on({ 'dialog:aftercreate': function (event, dialog, $element, settings) { if (Drupal.offCanvas.isOffCanvas($element)) { $(window).trigger('resize.tabs'); Loading @@ -34,6 +35,7 @@ } }); } } }; // Append .ckeditor-off-canvas-reset to document to disable ckeditor reset. Loading @@ -41,4 +43,4 @@ // @see web/core/modules/ckeditor/js/ckeditor.off-canvas-css-reset.es6.js $(document.body).append('<style id="ckeditor-off-canvas-reset"></style>'); })(jQuery, Drupal); })(jQuery, Drupal, once); js/webform.ajax.js +5 −6 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for Ajax. */ (function ($, Drupal, drupalSettings) { (function ($, Drupal, drupalSettings, once) { 'use strict'; Loading @@ -30,7 +30,7 @@ */ Drupal.behaviors.webformAjaxLink = { attach: function (context) { $('.webform-ajax-link', context).once('webform-ajax-link').each(function () { $(once('webform-ajax-link', '.webform-ajax-link', context)).each(function () { var element_settings = {}; element_settings.progress = {type: 'fullscreen'}; Loading Loading @@ -71,7 +71,7 @@ */ Drupal.behaviors.webformAjaxHash = { attach: function (context) { $('[data-hash]', context).once('webform-ajax-hash').each(function () { $(once('webform-ajax-hash', '[data-hash]', context)).each(function () { var hash = $(this).data('hash'); if (hash) { $(this).on('click', function () { Loading @@ -92,8 +92,7 @@ */ Drupal.behaviors.webformConfirmationBackAjax = { attach: function (context) { $('.js-webform-confirmation-back-link-ajax', context) .once('webform-confirmation-back-ajax') $(once('webform-confirmation-back-ajax', '.js-webform-confirmation-back-link-ajax', context)) .on('click', function (event) { var $form = $(this).parents('form'); Loading Loading @@ -334,4 +333,4 @@ } }; })(jQuery, Drupal, drupalSettings); })(jQuery, Drupal, drupalSettings, once); js/webform.announce.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for announcing changes. */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -24,10 +24,10 @@ */ Drupal.behaviors.webformAnnounce = { attach: function (context) { $('[data-webform-announce]', context).once('data-webform-announce').each(function () { $(once('data-webform-announce', '[data-webform-announce]', context)).each(function () { Drupal.announce($(this).data('webform-announce')); }); } }; })(jQuery, Drupal); })(jQuery, Drupal, once); Loading
js/webform.admin.dropbutton.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * Dropbutton feature. */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -19,8 +19,8 @@ Drupal.behaviors.dropButton = { attach: function (context, settings) { dropButton.attach(context, settings); $(context).find('.webform-dropbutton .dropbutton-wrapper').once('webform-dropbutton').css('visibility', 'visible'); $(once('webform-dropbutton', '.webform-dropbutton .dropbutton-wrapper', context)).css('visibility', 'visible'); } }; })(jQuery, Drupal); })(jQuery, Drupal, once);
js/webform.admin.js +4 −4 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for admin pages. */ (function ($, Drupal, debounce) { (function ($, Drupal, debounce, once) { 'use strict'; Loading @@ -14,7 +14,7 @@ */ Drupal.behaviors.webformFilterAutocomplete = { attach: function (context) { $('.webform-filter-form input.form-autocomplete', context).once('webform-autocomplete') $(once('webform-autocomplete', '.webform-filter-form input.form-autocomplete', context)) .each(function () { // If input value is an autocomplete match, reset the input to its // default value. Loading Loading @@ -42,7 +42,7 @@ attach: function (context) { // Only attach the click event handler to the entire table and determine // which row triggers the event. $('.webform-results-table', context).once('webform-results-table').on('click', function (event) { $(once('webform-results-table', '.webform-results-table', context)).on('click', function (event) { if (event.target.tagName === 'A' || event.target.tagName === 'BUTTON' || event.target.tagName === 'INPUT') { return true; } Loading Loading @@ -70,4 +70,4 @@ } }; })(jQuery, Drupal, Drupal.debounce); })(jQuery, Drupal, Drupal.debounce, once);
js/webform.admin.off-canvas.js +15 −13 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * @see misc/dialog/off-canvas.js */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -21,7 +21,8 @@ attach: function () { // Resize seven.theme tabs when off-canvas dialog opened and closed. // @see core/themes/seven/js/nav-tabs.js $(window).once('webform-off-canvas').on({ if(once('webform-off-canvas', 'html').length) { $(window).on({ 'dialog:aftercreate': function (event, dialog, $element, settings) { if (Drupal.offCanvas.isOffCanvas($element)) { $(window).trigger('resize.tabs'); Loading @@ -34,6 +35,7 @@ } }); } } }; // Append .ckeditor-off-canvas-reset to document to disable ckeditor reset. Loading @@ -41,4 +43,4 @@ // @see web/core/modules/ckeditor/js/ckeditor.off-canvas-css-reset.es6.js $(document.body).append('<style id="ckeditor-off-canvas-reset"></style>'); })(jQuery, Drupal); })(jQuery, Drupal, once);
js/webform.ajax.js +5 −6 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for Ajax. */ (function ($, Drupal, drupalSettings) { (function ($, Drupal, drupalSettings, once) { 'use strict'; Loading @@ -30,7 +30,7 @@ */ Drupal.behaviors.webformAjaxLink = { attach: function (context) { $('.webform-ajax-link', context).once('webform-ajax-link').each(function () { $(once('webform-ajax-link', '.webform-ajax-link', context)).each(function () { var element_settings = {}; element_settings.progress = {type: 'fullscreen'}; Loading Loading @@ -71,7 +71,7 @@ */ Drupal.behaviors.webformAjaxHash = { attach: function (context) { $('[data-hash]', context).once('webform-ajax-hash').each(function () { $(once('webform-ajax-hash', '[data-hash]', context)).each(function () { var hash = $(this).data('hash'); if (hash) { $(this).on('click', function () { Loading @@ -92,8 +92,7 @@ */ Drupal.behaviors.webformConfirmationBackAjax = { attach: function (context) { $('.js-webform-confirmation-back-link-ajax', context) .once('webform-confirmation-back-ajax') $(once('webform-confirmation-back-ajax', '.js-webform-confirmation-back-link-ajax', context)) .on('click', function (event) { var $form = $(this).parents('form'); Loading Loading @@ -334,4 +333,4 @@ } }; })(jQuery, Drupal, drupalSettings); })(jQuery, Drupal, drupalSettings, once);
js/webform.announce.js +3 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * JavaScript behaviors for announcing changes. */ (function ($, Drupal) { (function ($, Drupal, once) { 'use strict'; Loading @@ -24,10 +24,10 @@ */ Drupal.behaviors.webformAnnounce = { attach: function (context) { $('[data-webform-announce]', context).once('data-webform-announce').each(function () { $(once('data-webform-announce', '[data-webform-announce]', context)).each(function () { Drupal.announce($(this).data('webform-announce')); }); } }; })(jQuery, Drupal); })(jQuery, Drupal, once);