]> source.dussan.org Git - archiva.git/commitdiff
move commun function to util.js
authorOlivier Lamy <olamy@apache.org>
Mon, 16 Jan 2012 13:27:48 +0000 (13:27 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 16 Jan 2012 13:27:48 +0000 (13:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1231993 13f79535-47bb-0310-9956-ffa450edef68

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

index 706bc5c4194b80416e866230679fd0d1db6b83cf..ddbce533f361a0fab66fb1f19a7b5de50e841e45 100644 (file)
@@ -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
index 5e6de8a78b043102048178e456c4e625692a51fb..fc261adaa284e79267dd217d1f37daecdf1aa781 100644 (file)
@@ -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>" )
+  }
 }
\ No newline at end of file