diff --git a/core/modules/system/system.js b/core/modules/system/system.js index 5c808d3..99f0633 100644 --- a/core/modules/system/system.js +++ b/core/modules/system/system.js @@ -1,4 +1,4 @@ -(function ($) { +(function ($, Drupal, drupalSettings) { "use strict"; @@ -11,11 +11,11 @@ var ids = []; * administrator e-mail address with the same value as the site e-mail address. */ Drupal.behaviors.copyFieldValue = { - attach: function (context, settings) { + attach: function (context) { // List of fields IDs on which to bind the event listener. // Create an array of IDs to use with jQuery. - for (var sourceId in settings.copyFieldValue) { - if (settings.copyFieldValue.hasOwnProperty(sourceId)) { + for (var sourceId in drupalSettings.copyFieldValue) { + if (drupalSettings.copyFieldValue.hasOwnProperty(sourceId)) { ids.push(sourceId); } } @@ -55,9 +55,9 @@ Drupal.behaviors.copyFieldValue = { */ valueSourceBlurHandler: function (e) { var value = $(e.target).val(); - var targetIds = Drupal.settings.copyFieldValue[e.target.id]; + var targetIds = drupalSettings.copyFieldValue[e.target.id]; $('#' + targetIds.join(', #')).trigger('value:copy', value); } }; -})(jQuery); +})(jQuery, Drupal, drupalSettings); diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4475104..c24fbdc 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1965,6 +1965,7 @@ function system_library_info() { array('system', 'jquery'), array('system', 'drupal'), array('system', 'drupalSettings'), + array('system', 'jquery.once'), ), ); $libraries['drupal.system.cron'] = array(