[-] BO :FixBug Suppliers and Warehouses accordion
This commit is contained in:
@@ -1296,13 +1296,10 @@ product_tabs['Suppliers'] = new function(){
|
||||
|
||||
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
|
||||
setTimeout(function() {
|
||||
$('#suppliers_accordion').accordion();
|
||||
// If one second was not enough to display page, another resize is needed
|
||||
setTimeout(function() {
|
||||
$('#suppliers_accordion').accordion({
|
||||
collapsible: true,
|
||||
autoHeight: true});
|
||||
}, 3000);
|
||||
$('#suppliers_accordion').accordion({
|
||||
collapsible: true,
|
||||
autoHeight: true,
|
||||
heightStyle: "content"});
|
||||
}, 1000);
|
||||
|
||||
// Resize the accordion once the page is visible because of the bug with accordions initialized
|
||||
@@ -1310,7 +1307,8 @@ product_tabs['Suppliers'] = new function(){
|
||||
$('#suppliers_accordion').parents('.product-tab-content').bind('displayed', function(){
|
||||
$('#suppliers_accordion').accordion({
|
||||
collapsible: true,
|
||||
autoHeight: true});
|
||||
autoHeight: true,
|
||||
heightStyle: "content"});
|
||||
});
|
||||
};
|
||||
}
|
||||
@@ -1412,13 +1410,19 @@ product_tabs['Warehouses'] = new function(){
|
||||
|
||||
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
|
||||
setTimeout(function() {
|
||||
$('#warehouse_accordion').accordion();
|
||||
}, 500);
|
||||
$('#warehouse_accordion').accordion({
|
||||
collapsible: true,
|
||||
autoHeight: true,
|
||||
heightStyle: "content"});
|
||||
}, 1000);
|
||||
|
||||
// Resize the accordion once the page is visible because of the bug with accordions initialized
|
||||
// inside a display:none block not having the correct size.
|
||||
$('#warehouse_accordion').parents('.product-tab-content').bind('displayed', function(){
|
||||
$('#warehouse_accordion').accordion("refresh");
|
||||
$('#warehouse_accordion').accordion({
|
||||
collapsible: true,
|
||||
autoHeight: true,
|
||||
heightStyle: "content"});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user