[-] BO : fixed bug #PSCFV-5991 - CMS friendly URL does not automatically copied

This commit is contained in:
vAugagneur
2012-12-10 10:51:46 +01:00
parent 53f1e8fcbb
commit 221667a80d
5 changed files with 34 additions and 5 deletions
+3
View File
@@ -52,6 +52,9 @@ function str2url(str,encoding,ucfirst)
function copy2friendlyURL()
{
if (typeof(id_product) == 'undefined')
id_product = false;
if (!$('#link_rewrite_' + id_language).val().length || !id_product)//check if user didn't type anything in rewrite field, to prevent overwriting
{
$('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8').replace('%', ''));