Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / language / language.admin.js
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function ($, Drupal) {
9   Drupal.behaviors.negotiationLanguage = {
10     attach: function attach() {
11       var $configForm = $('#language-negotiation-configure-form');
12       var inputSelector = 'input[name$="[configurable]"]';
13
14       function toggleTable(checkbox) {
15         var $checkbox = $(checkbox);
16
17         $checkbox.closest('.table-language-group').find('table, .tabledrag-toggle-weight').toggle($checkbox.prop('checked'));
18       }
19
20       $configForm.once('negotiation-language-admin-bind').on('change', inputSelector, function (event) {
21         toggleTable(event.target);
22       });
23
24       $configForm.find(inputSelector + ':not(:checked)').each(function (index, element) {
25         toggleTable(element);
26       });
27     }
28   };
29 })(jQuery, Drupal);