[-] BO :FixBug Suppliers and Warehouses accordion
This commit is contained in:
+15
-11
@@ -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
|
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('#suppliers_accordion').accordion();
|
$('#suppliers_accordion').accordion({
|
||||||
// If one second was not enough to display page, another resize is needed
|
collapsible: true,
|
||||||
setTimeout(function() {
|
autoHeight: true,
|
||||||
$('#suppliers_accordion').accordion({
|
heightStyle: "content"});
|
||||||
collapsible: true,
|
|
||||||
autoHeight: true});
|
|
||||||
}, 3000);
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
// Resize the accordion once the page is visible because of the bug with accordions initialized
|
// 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').parents('.product-tab-content').bind('displayed', function(){
|
||||||
$('#suppliers_accordion').accordion({
|
$('#suppliers_accordion').accordion({
|
||||||
collapsible: true,
|
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
|
// @TODO: a better way to fix the accordion wrong size bug when the selected page is this page
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('#warehouse_accordion').accordion();
|
$('#warehouse_accordion').accordion({
|
||||||
}, 500);
|
collapsible: true,
|
||||||
|
autoHeight: true,
|
||||||
|
heightStyle: "content"});
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
// Resize the accordion once the page is visible because of the bug with accordions initialized
|
// 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.
|
// inside a display:none block not having the correct size.
|
||||||
$('#warehouse_accordion').parents('.product-tab-content').bind('displayed', function(){
|
$('#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