From: Olivier Lamy Date: Wed, 11 Jan 2012 23:34:32 +0000 (+0000) Subject: add a global ajax error handler to display errror messages for ajax call failure X-Git-Tag: archiva-1.4-M3~1609 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e267d43bb132b812a54250100429486f40b373c5;p=archiva.git add a global ajax error handler to display errror messages for ajax call failure git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1230326 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js index ce15e801b..b2e3bd57a 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js @@ -73,6 +73,10 @@ displayWarningMessage=function(text,idToAppend){ $(textId).focus(); } +$("#user-messages").ajaxError(function(e, jqxhr, settings, exception) { + displayErrorMessage( "ajaxError:"+exception ); +}); + /** * clear #main-content and call clearUserMessages */