Merge pull request #164 from sylvainblot/patch-1

Fix slug auto-population for translation with dash
This commit is contained in:
Diogo Marques 2018-02-28 15:04:22 +00:00 committed by GitHub
commit f8c3dd369f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ $(document).ready(function () {
var slugFollowsTitle = false;
$.each(langs, function (idx, lang_code) {
lang_code = lang_code.replace("-", "_");
$('#id_title_' + lang_code).on('focus', function () {
/* slug should only follow the title field if its value matched the title's value at the time of focus */
var currentSlug = $('#id_slug_' + lang_code).val();
@ -19,4 +20,4 @@ $(document).ready(function () {
});
});
}
});
});