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
Date Mon, 08 Mar 2004 23:24:25 GMT
rleland     2004/03/08 15:24:25

  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
  Log:
  Bug 17667 Patch and bug report by Alexander Merk
  This allows multiple forms to be on the same page
  by generating a unique variable name based on form name.
  
  Revision  Changes    Path
  1.7       +3 -2      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- validateByte.js	2 Feb 2004 23:58:52 -0000	1.6
  +++ validateByte.js	8 Mar 2004 23:24:25 -0000	1.7
  @@ -11,7 +11,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oByte = new ByteValidations();
  +        oByte = eval('new ' + form.name + '_ByteValidations()');
  +
           for (x in oByte) {
               var field = form[oByte[x][0]];
   
  
  
  
  1.6       +3 -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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- validateCreditCard.js	15 Dec 2003 02:56:57 -0000	1.5
  +++ validateCreditCard.js	8 Mar 2004 23:24:25 -0000	1.6
  @@ -11,7 +11,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oCreditCard = new creditCard();
  +        oCreditCard = eval('new ' + form.name + '_creditCard()');
  +
           for (x in oCreditCard) {
               if ((form[oCreditCard[x][0]].type == 'text' ||
                    form[oCreditCard[x][0]].type == 'textarea') &&
  
  
  
  1.8       +3 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validateDate.js	2 Feb 2004 23:58:52 -0000	1.7
  +++ validateDate.js	8 Mar 2004 23:24:25 -0000	1.8
  @@ -11,7 +11,8 @@
          var focusField = null;
          var i = 0;
          var fields = new Array();
  -       oDate = new DateValidations();
  +       oDate = eval('new ' + form.name + '_DateValidations()');
  +
          for (x in oDate) {
              var field = form[oDate[x][0]];
              var value = field.value;
  
  
  
  1.7       +3 -2      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- validateEmail.js	2 Feb 2004 23:58:52 -0000	1.6
  +++ validateEmail.js	8 Mar 2004 23:24:25 -0000	1.7
  @@ -11,7 +11,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oEmail = new email();
  +        oEmail = eval('new ' + form.name + '_email()');
  +
           for (x in oEmail) {
               var field = form[oEmail[x][0]];
               if ((field.type == 'hidden' || 
  
  
  
  1.9       +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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateFloat.js	2 Feb 2004 23:58:52 -0000	1.8
  +++ validateFloat.js	8 Mar 2004 23:24:25 -0000	1.9
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oFloat = new FloatValidations();
  +        oFloat = eval('new ' + form.name + '_FloatValidations()');
           for (x in oFloat) {
           	var field = form[oFloat[x][0]];
           	
  
  
  
  1.7       +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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- validateFloatRange.js	2 Feb 2004 23:58:52 -0000	1.6
  +++ validateFloatRange.js	8 Mar 2004 23:24:25 -0000	1.7
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oRange = new floatRange();
  +        oRange = eval('new ' + form.name + '_floatRange()');
           for (x in oRange) {
               var field = form[oRange[x][0]];
               
  
  
  
  1.8       +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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validateIntRange.js	2 Feb 2004 23:58:52 -0000	1.7
  +++ validateIntRange.js	8 Mar 2004 23:24:25 -0000	1.8
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oRange = new intRange();
  +        oRange = eval('new ' + form.name + '_intRange()');        
           for (x in oRange) {
               var field = form[oRange[x][0]];
               if (field.disabled == false)  {
  
  
  
  1.7       +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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- validateInteger.js	2 Feb 2004 23:58:52 -0000	1.6
  +++ validateInteger.js	8 Mar 2004 23:24:25 -0000	1.7
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oInteger = new IntegerValidations();
  +        oInteger = eval('new ' + form.name + '_IntegerValidations()');
           for (x in oInteger) {
               var field = form[oInteger[x][0]];
   
  
  
  
  1.8       +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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validateMask.js	3 Feb 2004 02:15:42 -0000	1.7
  +++ validateMask.js	8 Mar 2004 23:24:25 -0000	1.8
  @@ -11,7 +11,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oMasked = new mask();
  +        oMasked = eval('new ' + form.name + '_mask()');      
           for (x in oMasked) {
               var field = form[oMasked[x][0]];
   
  
  
  
  1.8       +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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- validateMaxLength.js	2 Feb 2004 23:58:52 -0000	1.7
  +++ validateMaxLength.js	8 Mar 2004 23:24:25 -0000	1.8
  @@ -14,7 +14,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oMaxLength = new maxlength();
  +        oMaxLength = eval('new ' + form.name + '_maxlength()');        
           for (x in oMaxLength) {
               var field = form[oMaxLength[x][0]];
   
  
  
  
  1.9       +3 -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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- validateMinLength.js	2 Feb 2004 23:58:52 -0000	1.8
  +++ validateMinLength.js	8 Mar 2004 23:24:25 -0000	1.9
  @@ -14,7 +14,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oMinLength = new minlength();
  +        oMinLength = eval('new ' + form.name + '_minlength()');
  +
           for (x in oMinLength) {
               var field = form[oMinLength[x][0]];
   
  
  
  
  1.11      +2 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- validateRequired.js	2 Feb 2004 23:58:52 -0000	1.10
  +++ validateRequired.js	8 Mar 2004 23:24:25 -0000	1.11
  @@ -12,7 +12,7 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oRequired = new required();
  +        oRequired = eval('new ' + form.name + '_required()');
   
           for (x in oRequired) {
               var field = form[oRequired[x][0]];
  
  
  
  1.7       +3 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- validateShort.js	2 Feb 2004 23:58:52 -0000	1.6
  +++ validateShort.js	8 Mar 2004 23:24:25 -0000	1.7
  @@ -11,7 +11,8 @@
           var focusField = null;
           var i = 0;
           var fields = new Array();
  -        oShort = new ShortValidations();
  +        oShort = eval('new ' + form.name + '_ShortValidations()');
  +
           for (x in oShort) {
               var field = form[oShort[x][0]];
   
  
  
  

---------------------------------------------------------------------
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