From be00a244a31c8bc7eeab97c8b80ade94cdad1317 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Mon, 26 Mar 2012 08:00:05 +0000 Subject: [PATCH] [-] BO : fix bug #PSTEST-1079 - product supplier page accordion is initialized too early if page loading is slow, resizing necessary --- .../default/template/controllers/products/suppliers.tpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/products/suppliers.tpl b/admin-dev/themes/default/template/controllers/products/suppliers.tpl index 20d4682b6..e356120a6 100644 --- a/admin-dev/themes/default/template/controllers/products/suppliers.tpl +++ b/admin-dev/themes/default/template/controllers/products/suppliers.tpl @@ -197,7 +197,11 @@ // @TODO: a better way to fix the accordion wrong size bug when the selected page is this page setTimeout(function() { $('#suppliers_accordion').accordion(); - }, 500); + // If one second was not enough to display page, another resize is needed + setTimeout(function() { + $('#suppliers_accordion').accordion('resize'); + }, 3000); + }, 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.