[-] BO : FixBug Friendly URL by language

This commit is contained in:
Jerome Nadaud committed 2013-08-19 17:51:53 +02:00
1 parent 68d7a320cd
commit 5336467e04
2 files changed
+8 -5

No files matched your search

@@ -110,10 +110,12 @@
<div class="row"> <div class="row">
<div class="col-lg-9 col-offset-3"> <div class="col-lg-9 col-offset-3">
<div class="alert alert-block"> {foreach from=$languages item=language}
<div class="alert alert-block translatable-field lang-{$language.id_lang}">
<i class="icon-link"></i> {l s='The product link will look like this:'} <i class="icon-link"></i> {l s='The product link will look like this:'}
{$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url">{$product->link_rewrite[$default_language]}</span>.html {$curent_shop_url|escape:'htmlall':'UTF-8'}lang/{if isset($product->id)}{$product->id}{else}<b>id_product</b>{/if}-<span id="friendly-url_{$language.id_lang}">{$product->link_rewrite[$default_language]}</span>.html
</div> </div>
{/foreach}
</div> </div>
</div> </div>
</fieldset> </fieldset>
+4 -3
View File
@@ -130,7 +130,7 @@ function updateCurrentText()
function updateFriendlyURLByName() function updateFriendlyURLByName()
{ {
$('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val(), 'UTF-8')); $('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val(), 'UTF-8'));
$('#friendly-url').html($('#link_rewrite_' + id_language).val()); $('#friendly-url_' + id_language).html($('#link_rewrite_' + id_language).val());
} }
function updateFriendlyURL() function updateFriendlyURL()
@@ -138,7 +138,7 @@ function updateFriendlyURL()
var link = $('#link_rewrite_' + id_language); var link = $('#link_rewrite_' + id_language);
if (link[0]) if (link[0])
{ {
$('#friendly-url').text(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8')); $('#friendly-url_' + id_language).text(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8'));
} }
} }
@@ -148,7 +148,7 @@ function updateLinkRewrite()
if (link[0]) if (link[0])
{ {
link.val(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8')); link.val(str2url($('#link_rewrite_' + id_language).val(), 'UTF-8'));
$('#friendly-url').text(link.val()); $('#friendly-url_' + id_language).text(link.val());
} }
} }
@@ -1046,6 +1046,7 @@ function hideOtherLanguage(id)
{ {
$('.translatable-field').hide(); $('.translatable-field').hide();
$('.lang-' + id).show(); $('.lang-' + id).show();
id_language = id;
} }
function sendBulkAction(form, action) function sendBulkAction(form, action)