From 359fc4c1b648e394e4524ed2db727006c786ebcc Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Thu, 1 Mar 2012 10:16:18 +0000 Subject: [PATCH] [-] BO : fix bug where drag and drop on tabs sub-lists is broken --- admin-dev/ajax.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/admin-dev/ajax.php b/admin-dev/ajax.php index e170072d3..2f74a9d62 100644 --- a/admin-dev/ajax.php +++ b/admin-dev/ajax.php @@ -919,6 +919,14 @@ if (Tools::isSubmit('ajaxTabsPositions')) $id_tab = (int)(Tools::getValue('id_tab')); $positions = Tools::getValue('tab'); + // when changing positions in a tab sub-list, the first array value is empty and needs to be removed + if (!$positions[0]) + { + unset($positions[0]); + // reset indexation from 0 + $positions = array_merge($positions); + } + foreach ($positions as $position => $value) { $pos = explode('_', $value);