// Product tabs now trigger an event when finished loading. Fixed pack and virtual product not being updated when the loading is not complete.
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12077 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -114,6 +114,15 @@
|
||||
$('li.tab-row a[id*="Pack"]').show();
|
||||
$('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled');
|
||||
$('#ppackdiv').show();
|
||||
// If the pack tab has not finished loaded the changes will be made when the loading event is triggered
|
||||
$("#product-tab-content-Pack").bind('loaded', function(){
|
||||
$('#ppack').val(1).attr('checked', true).attr('disabled', 'disabled');
|
||||
$('#ppackdiv').show();
|
||||
});
|
||||
$("#product-tab-content-Quantities").bind('loaded', function(){
|
||||
$('.stockForVirtualProduct').show();
|
||||
});
|
||||
|
||||
$('li.tab-row a[id*="Shipping"]').show();
|
||||
$('#condition').removeAttr('disabled');
|
||||
$('#condition option[value=new]').removeAttr('selected');
|
||||
@@ -126,6 +135,15 @@
|
||||
$('#virtual_good').show();
|
||||
$('#is_virtual').val(1);
|
||||
$("#virtual_good_attributes").show();
|
||||
// If the virtual product tab has not finished loaded the changes will be made when the loading event is triggered
|
||||
$("#product-tab-content-VirtualProduct").bind('loaded', function(){
|
||||
$('#virtual_good').show();
|
||||
$('#is_virtual').val(1);
|
||||
$("#virtual_good_attributes").show();
|
||||
});
|
||||
$("#product-tab-content-Quantities").bind('loaded', function(){
|
||||
$('.stockForVirtualProduct').hide();
|
||||
});
|
||||
$('li.tab-row a[id*="Shipping"]').hide();
|
||||
$('#condition').attr('disabled', 'disabled');
|
||||
$('#condition option[value=refurbished]').removeAttr('selected');
|
||||
|
||||
@@ -1888,7 +1888,7 @@ class AdminProductsControllerCore extends AdminController
|
||||
continue;
|
||||
|
||||
$product_tabs[$product_tab] = array(
|
||||
'id' => ++$i.'-'.$product_tab,
|
||||
'id' => $product_tab,
|
||||
'selected' => (strtolower($product_tab) == strtolower($this->tab_display)),
|
||||
'name' => $this->available_tabs_lang[$product_tab],
|
||||
'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.Tools::getValue('id_product').'&action='.$product_tab,
|
||||
|
||||
@@ -251,6 +251,8 @@ function displayTabProductById(id, selected, index, stack)
|
||||
$("#product-tab-content-"+id).removeClass('loading');
|
||||
if (selected)
|
||||
$('#product-tab-content-wait').hide();
|
||||
|
||||
$("#product-tab-content-"+id).trigger('loaded');
|
||||
if (stack && stack[index + 1])
|
||||
displayTabProductById(stack[index + 1], selected, index + 1, stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user