[-] BO : fix JS errors and redirection issues on product page

This commit is contained in:
tDidierjean
2012-01-16 15:31:07 +00:00
parent ce6c2ff3ee
commit cdfa82fc8b
4 changed files with 35 additions and 31 deletions
@@ -222,6 +222,8 @@
}
});
$(".productTabs a.selected").click();
{if $show_product_tab_content}
$("div.productTabs a[id$=-{$show_product_tab_content}]").click();
{/if}
@@ -100,7 +100,9 @@
</table>
<script type="text/javascript">
displayFlags(languages, id_language, allowEmployeeFormLang);
$(document).ready(function(){
displayFlags(languages, id_language, allowEmployeeFormLang);
});
</script>
@@ -410,20 +410,21 @@
var id_language = {$defaultFormLanguage};
var languages = new Array();
// Multilang field setup must happen before document is ready so that calls to displayFlags() to avoid
// precedence conflicts with other document.ready() blocks
{foreach $languages as $k => $language}
languages[{$k}] = {
id_lang: {$language.id_lang},
iso_code: '{$language.iso_code}',
name: '{$language.name}',
is_default: "{$language.is_default}"
};
{/foreach}
// we need allowEmployeeFormLang var in ajax request
allowEmployeeFormLang = {$allowEmployeeFormLang};
displayFlags(languages, id_language, allowEmployeeFormLang);
$(document).ready(function() {
{foreach $languages as $k => $language}
languages[{$k}] = {
id_lang: {$language.id_lang},
iso_code: '{$language.iso_code}',
name: '{$language.name}',
is_default: "{$language.is_default}"
};
{/foreach}
// we need allowEmployeeFormLang var in ajax request
allowEmployeeFormLang = {$allowEmployeeFormLang};
displayFlags(languages, id_language, allowEmployeeFormLang);
{if isset($fields_value.id_state)}
if ($('#id_country') && $('#id_state'))
{