Mercurial > hg > isophonics-drupal-site
view core/modules/language/language.admin.js @ 5:c69a71b4f40f
Add slideshow module
author | Chris Cannam |
---|---|
date | Thu, 07 Dec 2017 14:46:23 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
/** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal) { Drupal.behaviors.negotiationLanguage = { attach: function attach() { var $configForm = $('#language-negotiation-configure-form'); var inputSelector = 'input[name$="[configurable]"]'; function toggleTable(checkbox) { var $checkbox = $(checkbox); $checkbox.closest('.table-language-group').find('table, .tabledrag-toggle-weight').toggle($checkbox.prop('checked')); } $configForm.once('negotiation-language-admin-bind').on('change', inputSelector, function (event) { toggleTable(event.target); }); $configForm.find(inputSelector + ':not(:checked)').each(function (index, element) { toggleTable(element); }); } }; })(jQuery, Drupal);