mirror of https://github.com/apache/archiva.git
move commun function to util.js
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1231993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c86c62cd2d
commit
4831643aee
|
@ -26,17 +26,6 @@ $(function() {
|
|||
cache: false
|
||||
} );
|
||||
|
||||
customShowError=function(validator, errorMap, errorList) {
|
||||
$( "div.clearfix" ).removeClass( "error" );
|
||||
$( "span.help-inline" ).remove();
|
||||
for ( var i = 0; errorList[i]; i++ ) {
|
||||
var error = errorList[i];
|
||||
var field = $("#"+error.element.id);
|
||||
field.parents( "div.clearfix" ).addClass( "error" );
|
||||
field.parent().append( "<span class=\"help-inline\">" + error.message + "</span>" )
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* reccord a cookie for session with the logged user
|
||||
* @param user see user.js
|
||||
|
|
|
@ -250,4 +250,15 @@ displayRedbackError=function(obj,idToAppend) {
|
|||
$.log("displayRedbackError no array");
|
||||
displayErrorMessage($.i18n.prop( obj.redbackRestError.errorMessages.errorKey, obj.redbackRestError.errorMessages.args ),idToAppend);
|
||||
}
|
||||
}
|
||||
|
||||
customShowError=function(validator, errorMap, errorList) {
|
||||
$( "div.clearfix" ).removeClass( "error" );
|
||||
$( "span.help-inline" ).remove();
|
||||
for ( var i = 0; errorList[i]; i++ ) {
|
||||
var error = errorList[i];
|
||||
var field = $("#"+error.element.id);
|
||||
field.parents( "div.clearfix" ).addClass( "error" );
|
||||
field.parent().append( "<span class=\"help-inline\">" + error.message + "</span>" )
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue