From c313c5316ab887e287a3621e71d2b78b249dc431 Mon Sep 17 00:00:00 2001 From: mike-esokia Date: Mon, 28 May 2018 11:03:10 +0400 Subject: [PATCH] fix reordering of collections from admin interface --- templates/web/admin/collection/collection.html.twig | 6 +++--- templates/web/admin/collection/reorder.html.twig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/web/admin/collection/collection.html.twig b/templates/web/admin/collection/collection.html.twig index ce48d7ae18..3663525422 100644 --- a/templates/web/admin/collection/collection.html.twig +++ b/templates/web/admin/collection/collection.html.twig @@ -270,10 +270,10 @@ pub_wm: $this.val() }, success: function(datas) { - var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { + var html = _.template($("#alert_" + (datas.success ? "success" : "error") + "_tpl").html()); + $this.closest('.action-block').prepend(html({ content:datas.msg - }); - $this.closest('.action-block').prepend(html); + })); } }); }); diff --git a/templates/web/admin/collection/reorder.html.twig b/templates/web/admin/collection/reorder.html.twig index f8a3f2389b..b069eceb5d 100644 --- a/templates/web/admin/collection/reorder.html.twig +++ b/templates/web/admin/collection/reorder.html.twig @@ -94,10 +94,10 @@ $this.prop('disabled',true); }, success : function(datas) { - var html = _.template($("#alert_"+ (datas.success ? "success" : "error") +"_tpl").html(), { + var html = _.template($("#alert_" + (datas.success ? "success" : "error") + "_tpl").html()); + $('#notification').html(html({ content:datas.msg - }); - $('#notification').html(html); + })); AdminApp.LeftView.reloadTree('bases:bases', true); }, complete : function() {