Changeset 1511

Show
Ignore:
Timestamp:
08/12/07 01:06:35
Author:
douglm
Message:

Multi-valued hidden fields don't work - concat the values

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1510 r1511  
    16971697                    </div> 
    16981698 
     1699                    <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
    16991700                    <!-- if there are no recurence dates, the following table will show --> 
    17001701                    <table cellspacing="0" id="bwCurrentRdatesNone"> 
     
    17031704                    </table> 
    17041705 
    1705                     <!-- if there are no recurence dates, the following table will show --> 
     1706                    <!-- if there are recurrence dates, the following table will show --> 
    17061707                    <table cellspacing="0" id="bwCurrentRdates"> 
    17071708                      <tr> 
     
    17161717                    </table> 
    17171718 
    1718                     <!-- if there are no recurence dates, the following table will show --> 
     1719                    <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
     1720                    <!-- if there are no exception dates, the following table will show --> 
    17191721                    <table cellspacing="0" id="bwCurrentExdatesNone"> 
    17201722                      <tr><th>Exception Dates</th></tr> 
     
    17221724                    </table> 
    17231725 
    1724                     <!-- if there are no recurence dates, the following table will show --> 
     1726                    <!-- if there are exception dates, the following table will show --> 
    17251727                    <table cellspacing="0" id="bwCurrentExdates"> 
    17261728                      <tr> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1509 r1511  
    31783178              </div> 
    31793179 
     3180              <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
    31803181              <!-- if there are no recurrence dates, the following table will show --> 
    31813182              <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone"> 
     
    31973198              </table> 
    31983199 
    3199               <!-- if there are no recurence dates, the following table will show --> 
     3200              <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
     3201              <!-- if there are no exception dates, the following table will show --> 
    32003202              <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone"> 
    32013203                <tr><th>Exception Dates</th></tr> 
     
    32033205              </table> 
    32043206 
    3205               <!-- if there are no recurence dates, the following table will show --> 
     3207              <!-- if there are exception dates, the following table will show --> 
    32063208              <table cellspacing="0" class="invisible" id="bwCurrentExdates"> 
    32073209                <tr> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js

    r1509 r1511  
    6464   * rdi: index of rdate fro delete 
    6565   */ 
    66   this.toFormRow = function(varName, reqPar, row, rdi) { 
     66  this.toFormRow = function(varName, row, rdi) { 
    6767    row.insertCell(0).appendChild(document.createTextNode(this.date)); 
    6868    row.insertCell(1).appendChild(document.createTextNode(this.time)); 
    6969    row.insertCell(2).appendChild(document.createTextNode(this.tzid)); 
    7070    row.insertCell(3).innerHTML = "<a href=\"javascript:" + varName + ".deleteDate('" + 
    71                                    rdi + "')\">" + rdateDeleteStr + "</a>" + 
    72                                    "<input type='hidden' name='" + reqPar + 
    73                                    "' value='" + this.format() + "'/>"; 
     71                                   rdi + "')\">" + rdateDeleteStr + "</a>"; 
    7472  } 
    7573 
     
    119117} 
    120118 
    121 var bwRdates = new BwREXdates("bwRdates", "rdate", "bwCurrentRdates", "bwCurrentRdatesNone", 
     119var bwRdates = new BwREXdates("bwRdates", "bwRdatesField", 
     120                              "bwCurrentRdates", "bwCurrentRdatesNone", 
    122121                              "visible", "invisible", 2); 
    123 var bwExdates = new BwREXdates("bwExdates", "exdate", "bwCurrentExdates", "bwCurrentExdatesNone", 
     122var bwExdates = new BwREXdates("bwExdates", "bwExdatesField", 
     123                               "bwCurrentExdates", "bwCurrentExdatesNone", 
    124124                               "visible", "invisible", 2); 
    125125 
     
    127127 * 
    128128 * @param varName: NOT GOOD - name of object 
    129  * @param reqPar:    request parameter we gernate (multi-valued) 
     129 * @param reqParId: id of hidden field we update 
    130130 * @param tableId:   id of table we are manipulating 
    131131 * @param noDatesId: some info to display when we have nothing 
     
    134134 * @param numHeaderRows: Number of header rows in the table. 
    135135 */ 
    136 function BwREXdates(varName, reqPar, tableId, noDatesId, 
     136function BwREXdates(varName, reqParId, tableId, noDatesId, 
    137137                    visibleClass, invisibleClass, numHeaderRows) { 
    138138  var dates = new Array(); 
    139139 
    140140  this.varName = varName; 
    141   this.reqPar = reqPar
     141  this.reqParId = reqParId
    142142  this.tableId = tableId; 
    143143  this.noDatesId = noDatesId; 
     
    199199      // recreate the table rows 
    200200      for (var j = 0; j < dates.length; j++) { 
    201         var curRdate = dates[j]; 
     201        var curDate = dates[j]; 
    202202        var tr = rdTableBody.insertRow(j + numHeaderRows); 
    203203 
    204         curRdate.toFormRow(varName, reqPar, tr, j); 
     204        curDate.toFormRow(varName, tr, j); 
    205205      } 
    206206 
     
    212212        changeClass(noDatesId, invisibleClass); 
    213213      } 
     214 
     215      /* Update the hidden field */ 
     216 
     217      var formAcl = document.getElementById(reqParId); 
     218      formAcl.value = this.format(); 
     219 
    214220    } catch (e) { 
    215221      alert(e); 
    216222    } 
     223  } 
     224 
     225  this.format = function() { 
     226    var res = ""; 
     227 
     228    for (var j = 0; j < dates.length; j++) { 
     229      var curDate = dates[j]; 
     230 
     231      res += "DATE\t" + curDate.format(); 
     232    } 
     233 
     234    return res; 
    217235  } 
    218236}