]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1664] Validation error message not visible to user when adding Remote Repository.
authorOlivier Lamy <olamy@apache.org>
Tue, 11 Sep 2012 07:36:52 +0000 (07:36 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 11 Sep 2012 07:36:52 +0000 (07:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383268 13f79535-47bb-0310-9956-ffa450edef68

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

index b9fc4518634a22729d37a287a4b30bd8613af394..91495f4bf31045cbd598bd52089aba1f89396b9c 100644 (file)
@@ -199,10 +199,6 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery
               displaySuccessMessage($.i18n.prop('managedrepository.updated',self.managedRepository.id()));
               activateManagedRepositoriesGridTab();
               self.managedRepository.modified(false);
-            },
-            error: function(data) {
-              var res = $.parseJSON(data.responseText);
-              displayRestError(res);
             }
           }
         );
index ae2ce0582a51244a64673ba550fa90d6518fe063..3d0fa332be44b0587a96fa829025f4515e526411 100644 (file)
@@ -36,11 +36,12 @@ function() {
         clearUserMessages();
         displayErrorMessage($.i18n.prop('authz.karma.needed'));
       },
-      500: function(){
+      500: function(data){
         removeSmallSpinnerImg();
         removeMediumSpinnerImg("#main-content");
         clearUserMessages();
-        displayErrorMessage($.i18n.prop('error.500'));
+        displayRestError($.parseJSON(data.responseText));
+        //displayErrorMessage($.i18n.prop('error.500'));
       }
     }
   });
index 9581a24bb107d11a79709a71337aead64fdbd2ca..77a76ba971b8c2ba76da9e893628566480af2923 100644 (file)
@@ -281,7 +281,7 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
    * if not error is displayed in #user-messages div
    */
   displayRestError=function(data,idToAppend){
-
+    $.log("displayRestError");
     if (data.redbackRestError){
       displayRedbackError(archivaRestError,idToAppend)
     }
@@ -308,7 +308,7 @@ require(["jquery","jquery.tmpl","i18n"], function(jquery,jqueryTmpl,i18n) {
     if (data.errorKey && data.errorKey.length>0){
       displayErrorMessage($.i18n.prop( data.errorKey ),idToAppend);
     } else {
-      $.log("data.errorMessage:"+data.errorMessage);
+      $.log("print data.errorMessage:"+data.errorMessage);
       displayErrorMessage(data.errorMessage,idToAppend);
     }