diff --git a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php b/lib/Alchemy/Phrasea/Controller/Admin/Databox.php index e17fff2b4e..d6c76e5517 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/Databox.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/Databox.php @@ -985,7 +985,8 @@ class Databox implements ControllerProviderInterface $success = false; try { - foreach ($request->request->get('order', array()) as $order => $baseId) { + foreach ($request->request->get('order', array()) as $order => $data) { + $baseId = $data['id']; $collection = \collection::get_from_base_id($app, $baseId); $app['phraseanet.appbox']->set_collection_order($collection, $order); unset($collection); diff --git a/templates/web/admin/collection/reorder.html.twig b/templates/web/admin/collection/reorder.html.twig index 960b98d6f8..ceeebb7845 100644 --- a/templates/web/admin/collection/reorder.html.twig +++ b/templates/web/admin/collection/reorder.html.twig @@ -19,7 +19,13 @@ -
+ +
+ +
+ @@ -70,7 +76,7 @@ var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { content:datas.msg }); - $('#table-order').insertBefore(html); + $('#table-order').before(html); }, complete : function() { $this.attr('disabled', false); @@ -81,13 +87,13 @@ function moveUpItem(select){ select.find('option:selected').each(function(){ - $(this).insertBefore($(this).prev()); + $(this).before($(this).prev()); }); } function moveDownItem(select){ select.find('option:selected').each(function(){ - $(this).insertAfter($(this).next()); + $(this).after($(this).next()); }); } diff --git a/templates/web/admin/collection/suggested_value.html.twig b/templates/web/admin/collection/suggested_value.html.twig index a818939e5b..cf98cd37c9 100644 --- a/templates/web/admin/collection/suggested_value.html.twig +++ b/templates/web/admin/collection/suggested_value.html.twig @@ -655,7 +655,7 @@ function valid() if(data.success) { $('#tree li.selected a').trigger('click'); } else { - $(".page-header").insertAfter( + $(".page-header").after( '
' +'' + data.msg diff --git a/templates/web/common/templates.html.twig b/templates/web/common/templates.html.twig index 2d1dda571a..d97f44fe01 100644 --- a/templates/web/common/templates.html.twig +++ b/templates/web/common/templates.html.twig @@ -6,7 +6,7 @@