Update of /var/cvs/applications/editwizard/templates/javascript
In directory james.mmbase.org:/tmp/cvs-serv31369/javascript

Modified Files:
        validator.js 
Log Message:
support alternate way to enter day values (with a text box instead of dropdown)


See also: 
http://cvs.mmbase.org/viewcvs/applications/editwizard/templates/javascript


Index: validator.js
===================================================================
RCS file: /var/cvs/applications/editwizard/templates/javascript/validator.js,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- validator.js        27 Nov 2007 12:24:16 -0000      1.42
+++ validator.js        13 Feb 2008 13:18:54 -0000      1.43
@@ -3,7 +3,7 @@
  * Routines for validating the edit wizard form
  *
  * @since    MMBase-1.6
- * @version  $Id: validator.js,v 1.42 2007/11/27 12:24:16 michiel Exp $
+ * @version  $Id: validator.js,v 1.43 2008/02/13 13:18:54 pierre Exp $
  * @author   Kars Veling
  * @author   Pierre van Rooden
  * @author   Michiel Meeuwissen
@@ -111,6 +111,7 @@
 
 Validator.prototype.validateEvent = function (evt) {
     evt = (evt) ? evt : ((window.event) ? window.event : "")
+
     if (evt) {
         var elem = getTargetElement(evt)
         if (elem) {
@@ -418,6 +419,9 @@
     if ((ftype == "datetime") || (ftype == "date")) {
         month = form.elements["internal_" + id + "_month"].selectedIndex;
         day = form.elements["internal_" + id + "_day"].selectedIndex+1;
+        if (isNaN(day)) {
+          day = form.elements["internal_" + id + "_day"].value;
+        } 
         year = form.elements["internal_" + id + "_year"].value;
     }
     if ((ftype == "datetime") || (ftype == "time")) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to