]> source.dussan.org Git - archiva.git/commitdiff
add a global ajax error handler to display errror messages for ajax call failure
authorOlivier Lamy <olamy@apache.org>
Wed, 11 Jan 2012 23:34:32 +0000 (23:34 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 11 Jan 2012 23:34:32 +0000 (23:34 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1230326 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js

index ce15e801b5d3a931d677d7bbf252e8d2ce3cceb5..b2e3bd57ac0512da7a6c484f8269241f1e0a478a 100644 (file)
@@ -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
   */