diff --git a/js/gamutable.es6.js b/js/gamutable.es6.js index 88358fc..a077824 100644 --- a/js/gamutable.es6.js +++ b/js/gamutable.es6.js @@ -18,8 +18,9 @@ jQuery(function () { console.time('Chargement de VueJs APRES Ajax'); $.ajax({ url: url, + dataType: 'json', async: true, - }).done(function () { + }).done(function (retour) { if (parseInt(id) > 0) { app.rechargerJson(id); app.rechargerJson_deux(id); @@ -34,6 +35,9 @@ jQuery(function () { callback: function () {}, }); } + if (Array.isArray(retour) && retour.message_erreur !== undefined) { + alert(retour.message_erreur); + } }); }); diff --git a/js/gamutable.js b/js/gamutable.js index 7b73d71..c984d76 100644 --- a/js/gamutable.js +++ b/js/gamutable.js @@ -45,8 +45,9 @@ jQuery(function () { console.time('Chargement de VueJs APRES Ajax'); $.ajax({ url: url, + dataType: 'json', async: true - }).done(function () { + }).done(function (retour) { if (parseInt(id) > 0) { app.rechargerJson(id); app.rechargerJson_deux(id); @@ -64,6 +65,10 @@ jQuery(function () { callback: function callback() {} }); } + + if (Array.isArray(retour) && retour.message_erreur !== undefined) { + alert(retour.message_erreur); + } }); }); // lancement d'une modalbox