Skip to content

Commit

Permalink
improv. fix ordered navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
nivcoo authored Dec 5, 2021
1 parent 7c87e07 commit 4fbd34c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/View/Navbar/admin_index.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -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('<div class="alert alert-danger" style="margin-top:10px;margin-right:10px;margin-left:10px;"><a class="close" data-dismiss="alert">×</a><i class="icon icon-warning-sign"></i> <b><?= $Lang->get('GLOBAL__ERROR') ?> :</b> ' + data2[0] + '</i></div>').fadeIn(500);
} else if (!data.statut) {
$('.ajax-msg').empty().html('<div class="alert alert-danger" style="margin-top:10px;margin-right:10px;margin-left:10px;"><a class="close" data-dismiss="alert">×</a><i class="icon icon-warning-sign"></i> <b><?= $Lang->get('GLOBAL__ERROR') ?> :</b> ' + data.msg + '</i></div>').fadeIn(500);
} else {
$('.ajax-msg').empty().html('<div class="alert alert-danger" style="margin-top:10px;margin-right:10px;margin-left:10px;"><a class="close" data-dismiss="alert">×</a><i class="icon icon-warning-sign"></i> <b><?= $Lang->get('GLOBAL__ERROR') ?> :</b> <?= $Lang->get('ERROR__INTERNAL_ERROR') ?></i></div>');
}
Expand Down

0 comments on commit 4fbd34c

Please sign in to comment.