//small js fix

This commit is contained in:
vAugagneur
2012-12-07 18:01:32 +01:00
parent cc7c40d4e9
commit af3eb2cc38
+1 -1
View File
@@ -52,7 +52,7 @@ function str2url(str,encoding,ucfirst)
function copy2friendlyURL()
{
if (!$('#link_rewrite_' + id_language).val().length)//check if user didn't type anything in rewrite field, to prevent overwriting
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('%', ''));
if ($('#friendly-url'))