From e267d43bb132b812a54250100429486f40b373c5 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 11 Jan 2012 23:34:32 +0000 Subject: [PATCH] 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 --- .../archiva-webapp-js/src/main/webapp/js/archiva/utils.js | 4 ++++ 1 file changed, 4 insertions(+) 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 */ -- 2.39.5