Changeset 13322 for trunk/www/db_po


Ignore:
Timestamp:
04/05/12 17:01:43 (13 years ago)
Author:
Daniela Dorner
Message:
bugfix for date pulldowns
Location:
trunk/www/db_po
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/db_po/get_date.php

    r11780 r13322  
    9898        printf("<select id='%s%d'>\n", $_GET["fDateName"], $_GET["fIdx"]);
    9999    else
    100         printf("<select id='%s%d' onchange=\"get_dates('%s', this.value, this.value, %d, 'yes')\">\n",
     100        //printf("<select id='%s%d' onchange=\"get_dates('%s', this.value, this.value, %d, 'yes')\">\n",
     101        // fill dummy for first value, as else the value for the next pulldown might be set to a value by chance
     102        printf("<select id='%s%d' onchange=\"get_dates('%s', 'dummy', this.value, %d, 'yes')\">\n",
    101103               $_GET["fDateName"], $_GET["fIdx"], $newdatename, $_GET["fIdx"]);
     104
    102105    if (strcmp($_GET["fDateValue"],"empty")!=0)
    103106        printf("<option value='empty'>%s</option>\n", $datename);
  • trunk/www/db_po/po.js

    r12641 r13322  
    906906    if (val=="pulldown")
    907907    {
    908         //alert("reset:"+datename+"-"+dateval+"-"+dateval2+"-"+idx);
     908        /*
     909        alert("reset:"+datename+"-"+dateval+"-"+dateval2+"-"+idx);
    909910        if (datename=="year")
    910911        {
     
    936937            else
    937938                get_dates("sec", "empty", "empty", idx);
     939        */
     940
     941        if (datename=="year")
     942        {
     943            get_dates("year", "empty", "empty", idx);
     944            get_dates("month", "empty", "empty", idx);
     945        }
     946        if (datename=="year" || datename=="month")
     947            get_dates("day", "empty", "empty", idx);
     948        if (datename=="year" || datename=="month" || datename=="day")
     949            get_dates("hour", "empty", "empty", idx);
     950        if (datename=="year" || datename=="month" || datename=="day" || datename=="hour")
     951            get_dates("min", "empty", "empty", idx);
     952        if (datename=="year" || datename=="month" || datename=="day" || datename=="hour" || datename=="min")
     953            get_dates("sec", "empty", "empty", idx);
    938954    }
    939955    if (val=="textinput")
Note: See TracChangeset for help on using the changeset viewer.