// Changes to ajax tab loading in product page
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11478 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
displayFlags(languages, id_language, allowEmployeeFormLang);
|
||||
//displayFlags(languages, id_language, allowEmployeeFormLang);
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#addAttachment").live('click', function() {
|
||||
|
||||
@@ -75,10 +75,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var toload = new Array();
|
||||
|
||||
var tabs_preloaded = new Array();
|
||||
$(document).ready(function(){
|
||||
{foreach $tabs_preloaded as $k => $tab}
|
||||
tabs_preloaded['{$k}'] = '{$tab}';
|
||||
{/foreach}
|
||||
|
||||
$('.product-tab-content').each(function(){
|
||||
var id = $(this).attr('id').substr(20);
|
||||
var split_position = id.indexOf('-') + 1;
|
||||
var btn_name = id.substr(split_position);
|
||||
|
||||
if (tabs_preloaded[btn_name])
|
||||
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
|
||||
displayTabProductById('#link-'+id, id, false);
|
||||
});
|
||||
|
||||
{if $is_pack}
|
||||
$('#pack_product').attr('checked', 'checked');
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<script type="text/javascript">
|
||||
var token = '{$token}';
|
||||
var id_product = {if isset($product->id)}{$product->id}{else}0{/if};
|
||||
var tabs_preloaded = new Array();
|
||||
|
||||
{$combinationImagesJs}
|
||||
$(document).ready(function(){
|
||||
@@ -51,21 +50,6 @@
|
||||
updateMvtStatus($(this).val());
|
||||
});
|
||||
updateMvtStatus($(this).val());
|
||||
|
||||
{foreach $tabs_preloaded as $k => $tab}
|
||||
tabs_preloaded['{$k}'] = '{$tab}';
|
||||
{/foreach}
|
||||
|
||||
$('.product-tab-content').each(function(){
|
||||
var id = $(this).attr('id').substr(20);
|
||||
var split_position = id.indexOf('-') + 1;
|
||||
var btn_name = id.substr(split_position);
|
||||
|
||||
if (tabs_preloaded[btn_name])
|
||||
if ($("#product-tab-content-"+id).hasClass('not-loaded'))
|
||||
displayTabProductById('#link-'+id, id, false);
|
||||
});
|
||||
|
||||
});
|
||||
function updateMvtStatus(id_mvt_reason)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user