Now all modules are in core modules folder

This commit is contained in:
Manuel Cillero 2017-08-08 12:14:45 +02:00
parent 5ba1cdfa0b
commit 05b6a91b0c
1907 changed files with 0 additions and 0 deletions

16
modules/i18n/i18n.js Normal file
View file

@ -0,0 +1,16 @@
/**
* Rewrite autocomplete inputs to pass the language of the node currently being
* edited in the path.
*
* This functionality ensures node autocompletes get suggestions for the node's
* language rather than the current interface language.
*/
Drupal.behaviors.i18n = function (context) {
if (Drupal.settings && Drupal.settings.i18n) {
$('form[id^=node-form]', context).find('input.autocomplete[value^=' + Drupal.settings.i18n.interface_path + ']').each(function () {
$(this).val($(this).val().replace(Drupal.settings.i18n.interface_path, Drupal.settings.i18n.content_path));
});
}
};