[MRM-1664] Validation error message not visible to user when adding Remote Repository.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-09-11 07:36:52 +00:00
parent 512509f137
commit 1a2df0b49f
3 changed files with 5 additions and 8 deletions

View 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);
}
}
);

View 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'));
}
}
});

View 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);
}