commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlel...@apache.org
Subject cvs commit: jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript validateByte.js validateCreditCard.js validateDate.js validateEmail.js validateFloat.js validateFloatRange.js validateIntRange.js validateInteger.js validateMask.js validateMaxLength.js validateMinLength.js validateRequired.js validateShort.js validateUtilities.js
Date Sun, 28 Mar 2004 16:53:21 GMT
rleland     2004/03/28 08:53:21

  Modified:    validator/src/javascript/org/apache/commons/validator/javascript
                        validateByte.js validateCreditCard.js
                        validateDate.js validateEmail.js validateFloat.js
                        validateFloatRange.js validateIntRange.js
                        validateInteger.js validateMask.js
                        validateMaxLength.js validateMinLength.js
                        validateRequired.js validateShort.js
                        validateUtilities.js
  Log:
  Use DOM Level 1 Compatable calls for getting attributes
  
  Revision  Changes    Path
  1.9       +2 -3      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateByte.js
  
  Index: validateByte.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateByte.js,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateByte.js	25 Mar 2004 04:56:11 -0000	1.8
  +++ validateByte.js	28 Mar 2004 16:53:21 -0000	1.9
  @@ -11,8 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  -
  +        var formName = form.getAttributeNode("name"); 
           oByte = eval('new ' + formName.value + '_ByteValidations()');
   
           for (x in oByte) {
  
  
  
  1.8       +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateCreditCard.js
  
  Index: validateCreditCard.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateCreditCard.js,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validateCreditCard.js	25 Mar 2004 04:56:11 -0000	1.7
  +++ validateCreditCard.js	28 Mar 2004 16:53:21 -0000	1.8
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name");
   
           oCreditCard = eval('new ' + formName.value + '_creditCard()');
   
  
  
  
  1.10      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateDate.js
  
  Index: validateDate.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateDate.js,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- validateDate.js	25 Mar 2004 04:56:11 -0000	1.9
  +++ validateDate.js	28 Mar 2004 16:53:21 -0000	1.10
  @@ -11,7 +11,7 @@
          var focusField = null;
          var i = 0;
          var fields = new Array();
  -       var formName = getAttribute(form,"name");
  +       var formName = form.getAttributeNode("name"); 
   
          oDate = eval('new ' + formName.value + '_DateValidations()');
   
  
  
  
  1.9       +6 -3      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateEmail.js
  
  Index: validateEmail.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateEmail.js,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateEmail.js	25 Mar 2004 04:56:11 -0000	1.8
  +++ validateEmail.js	28 Mar 2004 16:53:21 -0000	1.9
  @@ -11,7 +11,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name");
  +
   
           oEmail = eval('new ' + formName.value + '_email()');
   
  @@ -88,4 +89,6 @@
              return false;
          }
          return true;
  -    }
  \ No newline at end of file
  +    }
  +
  +  
  \ No newline at end of file
  
  
  
  1.11      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloat.js
  
  Index: validateFloat.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloat.js,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- validateFloat.js	25 Mar 2004 04:56:11 -0000	1.10
  +++ validateFloat.js	28 Mar 2004 16:53:21 -0000	1.11
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +         var formName = form.getAttributeNode("name");
   
           oFloat = eval('new ' + formName.value + '_FloatValidations()');
           for (x in oFloat) {
  
  
  
  1.9       +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloatRange.js
  
  Index: validateFloatRange.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateFloatRange.js,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateFloatRange.js	25 Mar 2004 04:56:11 -0000	1.8
  +++ validateFloatRange.js	28 Mar 2004 16:53:21 -0000	1.9
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name"); 
   
           oRange = eval('new ' + formName.value + '_floatRange()');
           for (x in oRange) {
  
  
  
  1.10      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js
  
  Index: validateIntRange.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateIntRange.js,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- validateIntRange.js	25 Mar 2004 04:56:11 -0000	1.9
  +++ validateIntRange.js	28 Mar 2004 16:53:21 -0000	1.10
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name"); 
   
           oRange = eval('new ' + formName.value + '_intRange()');        
           for (x in oRange) {
  
  
  
  1.9       +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateInteger.js
  
  Index: validateInteger.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateInteger.js,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateInteger.js	25 Mar 2004 04:56:11 -0000	1.8
  +++ validateInteger.js	28 Mar 2004 16:53:21 -0000	1.9
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name"); 
   
           oInteger = eval('new ' + formName.value + '_IntegerValidations()');
           for (x in oInteger) {
  
  
  
  1.10      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMask.js
  
  Index: validateMask.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMask.js,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- validateMask.js	25 Mar 2004 04:56:11 -0000	1.9
  +++ validateMask.js	28 Mar 2004 16:53:21 -0000	1.10
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name"); 
   
           oMasked = eval('new ' + formName.value + '_mask()');      
           for (x in oMasked) {
  
  
  
  1.10      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMaxLength.js
  
  Index: validateMaxLength.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMaxLength.js,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- validateMaxLength.js	25 Mar 2004 04:56:11 -0000	1.9
  +++ validateMaxLength.js	28 Mar 2004 16:53:21 -0000	1.10
  @@ -14,7 +14,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name"); 
   
           oMaxLength = eval('new ' + formName.value + '_maxlength()');        
           for (x in oMaxLength) {
  
  
  
  1.11      +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMinLength.js
  
  Index: validateMinLength.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateMinLength.js,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- validateMinLength.js	25 Mar 2004 04:56:11 -0000	1.10
  +++ validateMinLength.js	28 Mar 2004 16:53:21 -0000	1.11
  @@ -14,7 +14,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name");
   
   
           oMinLength = eval('new ' + formName.value + '_minlength()');
  
  
  
  1.13      +3 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js
  
  Index: validateRequired.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateRequired.js,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- validateRequired.js	25 Mar 2004 04:56:11 -0000	1.12
  +++ validateRequired.js	28 Mar 2004 16:53:21 -0000	1.13
  @@ -12,7 +12,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name");
  +
           oRequired = eval('new ' + formName.value + '_required()');
   
           for (x in oRequired) {
  
  
  
  1.9       +2 -2      jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateShort.js
  
  Index: validateShort.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateShort.js,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateShort.js	25 Mar 2004 04:56:11 -0000	1.8
  +++ validateShort.js	28 Mar 2004 16:53:21 -0000	1.9
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        var formName = getAttribute(form,"name");
  +        var formName = form.getAttributeNode("name");
   
           oShort = eval('new ' + formName.value + '_ShortValidations()');
   
  
  
  
  1.2       +5 -27     jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js
  
  Index: validateUtilities.js
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/javascript/org/apache/commons/validator/javascript/validateUtilities.js,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- validateUtilities.js	25 Mar 2004 04:56:11 -0000	1.1
  +++ validateUtilities.js	28 Mar 2004 16:53:21 -0000	1.2
  @@ -1,28 +1,6 @@
       /*$RCSfile$ $Revision$ $Date$ */
  -    /**
  -    * Retrieves an attribute from an object.
  -    * This is useful if the attribute is hidden by a htmlElement
  -    *
  -    * <p>
  -    * @param form The form validation is taking place on.
  -    */
  -    function getAttribute(theObject,attribName) {
  -        var attrib = null;
  -        for (var attribIndex = 0; (attribIndex < theObject.attributes.length) &&
(attrib == null); attribIndex++) {
  -            if (theObject.attributes[attribIndex].name == attribName) {
  -                attrib = theObject.attributes[attribIndex];
  -            }
  -        }
  -        return attrib;
  -    }
  -        /**
  -    * Retrieves an attribute value of an object.
  -    * This is useful if the attribute is hidden by an htmlElement
  -    *
  -    * <p>
  -    * @param form The form validation is taking place on.
  -    */
  -    function getAttributeValue(theObject,attribName) {
   
  -        return getAttribute(theObject,attribName).value;
  -    }
  \ No newline at end of file
  +  /**
  +  * This is a place holder for common utilities used across the javascript validation
  +  *
  +  **/
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message