From 4fbd34cc7017e5c710001bc42caceb7688f024bf Mon Sep 17 00:00:00 2001 From: nivcoo <36514752+nivcoo@users.noreply.github.com> Date: Sun, 5 Dec 2021 22:57:03 +0100 Subject: [PATCH] improv. fix ordered navbar --- app/View/Navbar/admin_index.ctp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/View/Navbar/admin_index.ctp b/app/View/Navbar/admin_index.ctp index 319b3270..051deefb 100755 --- a/app/View/Navbar/admin_index.ctp +++ b/app/View/Navbar/admin_index.ctp @@ -79,11 +79,10 @@ $('#yolo').text(nav); inputs['data[_Token][key]'] = '= $csrfToken ?>'; $.post("= $this->Html->url(['controller' => 'navbar', 'action' => 'save_ajax', 'admin' => true]) ?>", inputs, function (data) { - data2 = data.split("|"); - if (data.indexOf('true') != -1) { + if (data.statut) { $('#save').empty().html('= $Lang->get('NAVBAR__SAVE_SUCCESS') ?>'); - } else if (data.indexOf('false') != -1) { - $('.ajax-msg').empty().html('