Changeset 1849

Show
Ignore:
Timestamp:
04/21/08 12:28:44
Author:
johnsa
Message:

web clients: finish off x-property client support; update admin client to use x-property params. This fixes some bugs in the display of the submissions comments in the admin client.

Files:

Legend:

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

    r1841 r1849  
    10401040 
    10411041    <!-- if a submitted event has comments, display them --> 
    1042     <xsl:if test="normalize-space(form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value) != ''"> 
     1042    <xsl:if test="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']"> 
    10431043      <script type="text/javascript"> 
    1044         bwSubmitComment = new bwSubmitComment('<xsl:value-of select="form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value"/>'); 
     1044        bwSubmitComment = new bwSubmitComment( 
     1045          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-ADDRESS']"/>', 
     1046          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-SUBADDRESS']"/>', 
     1047          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-URL']"/>', 
     1048          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-NAME']"/>', 
     1049          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-PHONE']"/>', 
     1050          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-URL']"/>', 
     1051          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-EMAIL']"/>', 
     1052          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CATEGORIES']"/>', 
     1053          '<xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/>'); 
    10451054      </script> 
    10461055 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r1848 r1849  
    240240 
    241241/* A comment accompanying a submitted event. 
    242  * comment: the x-property string X-BEDEWORK-SUBMIT-COMMENT, tab delimited 
     242 * These values come from the x-property X-BEDEWORK-SUBMIT-COMMENT 
     243 * locationAddress: value of parameter X-BEDEWORK-PARAM-LOCATION-ADDRESS 
     244 * locationSubaddress: value of parameter X-BEDEWORK-PARAM-LOCATION-SUBADDRESS 
     245 * locationUrl: value of parameter X-BEDEWORK-PARAM-LOCATION-URL 
     246 * contactName: value of parameter X-BEDEWORK-PARAM-CONTACT-NAME 
     247 * contactPhone: value of parameter X-BEDEWORK-PARAM-CONTACT-PHONE 
     248 * contactUrl: value of parameter X-BEDEWORK-PARAM-CONTACT-URL 
     249 * contactEmail: value of parameter X-BEDEWORK-PARAM-CONTACT-EMAIL 
     250 * category: value of parameter X-BEDEWORK-PARAM-CATEGORIES 
     251 * notes: value of the x-property 
    243252 */ 
    244 function bwSubmitComment(comment) { 
    245   var commentVals = comment.split("\t"); 
    246   this.locationAddress = (commentVals[0] == undefined) ? "" : commentVals[0]; 
    247   this.locationSubaddress = (commentVals[1] == undefined) ? "" : commentVals[1]; 
    248   this.locationUrl = (commentVals[2] == undefined) ? "" : commentVals[2]; 
    249   this.contactName = (commentVals[3] == undefined) ? "" : commentVals[3]; 
    250   this.contactPhone = (commentVals[4] == undefined) ? "" : commentVals[4]; 
    251   this.contactUrl = (commentVals[5] == undefined) ? "" : commentVals[5]; 
    252   this.contactEmail = (commentVals[6] == undefined) ? "" : commentVals[6]; 
    253   this.category = (commentVals[7] == undefined) ? "" : commentVals[7]; 
    254   this.notes = (commentVals[8] == undefined) ? "" : commentVals[8]; 
     253function bwSubmitComment(locationAddress,locationSubaddress,locationUrl,contactName,contactPhone,contactUrl,contactEmail,category,notes) { 
     254  this.locationAddress = locationAddress; 
     255  this.locationSubaddress = locationSubaddress; 
     256  this.locationUrl = locationUrl; 
     257  this.contactName = contactName; 
     258  this.contactPhone = contactPhone; 
     259  this.contactUrl = contactUrl; 
     260  this.contactEmail = contactEmail; 
     261  this.category = category; 
     262  this.notes = notes; 
    255263 
    256264  this.render = function() { 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkXProperties.js

    r1848 r1849  
    6969      for (var i = 0; i < this.params.length; i++) { 
    7070        if (this.params[i][1] != "") { 
    71           curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 
     71          curXparams += ";" + this.params[i][0]; 
     72          // if parameter values contain ";" or ":" they must be quoted 
     73          if (this.params[i][1].indexOf(":") != -1 || this.params[i][1].indexOf(";") != -1) { 
     74            curXparams += "=\"" + this.params[i][1] + "\""; 
     75          } else { 
     76            curXparams += "=" + this.params[i][1]; 
     77          } 
    7278        } 
    7379      } 
  • trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkXProperties.js

    r1848 r1849  
    6969      for (var i = 0; i < this.params.length; i++) { 
    7070        if (this.params[i][1] != "") { 
    71           curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 
     71          curXparams += ";" + this.params[i][0]; 
     72          // if parameter values contain ";" or ":" they must be quoted 
     73          if (this.params[i][1].indexOf(":") != -1 || this.params[i][1].indexOf(";") != -1) { 
     74            curXparams += "=\"" + this.params[i][1] + "\""; 
     75          } else { 
     76            curXparams += "=" + this.params[i][1]; 
     77          } 
    7278        } 
    7379      } 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkXProperties.js

    r1848 r1849  
    6969      for (var i = 0; i < this.params.length; i++) { 
    7070        if (this.params[i][1] != "") { 
    71           curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 
     71          curXparams += ";" + this.params[i][0]; 
     72          // if parameter values contain ";" or ":" they must be quoted 
     73          if (this.params[i][1].indexOf(":") != -1 || this.params[i][1].indexOf(";") != -1) { 
     74            curXparams += "=\"" + this.params[i][1] + "\""; 
     75          } else { 
     76            curXparams += "=" + this.params[i][1]; 
     77          } 
    7278        } 
    7379      }