# HG changeset patch # User Thierry Florac # Date 1528120863 -7200 # Node ID 13c5ac0603dd14de54f991c25827518737e60985 # Parent a473eb11ed155317e9ef2ec686692aa93371ae25 Small improvements in AJAX errors diff -r a473eb11ed15 -r 13c5ac0603dd src/pyams_skin/resources/js/myams.js --- a/src/pyams_skin/resources/js/myams.js Wed May 30 15:05:59 2018 +0200 +++ b/src/pyams_skin/resources/js/myams.js Mon Jun 04 16:01:03 2018 +0200 @@ -825,7 +825,7 @@ if (response.contentType === 'json') { ams.ajax.handleJSON(response.data); } else { - var title = event.statusText || event.type; + var title = error || event.statusText || event.type; var message = response.responseText; ams.skin.messageBox('error', { title: ams.i18n.ERROR_OCCURED, @@ -2640,7 +2640,10 @@ } else { target.empty(); } - }); + }) + .fail(function() { + target.empty(); + }); break; case 'json-rpc': target.html('
');