Changeset 1674

Show
Ignore:
Timestamp:
12/14/07 16:22:01
Author:
johnsa
Message:

admin client: return current calendar with event and updates to submitted comments display

Files:

Legend:

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

    r1669 r1674  
    321321} 
    322322#bwSubmittedEventCommentBlock table { 
    323   margin: 1em 0 0 0; 
     323  float: left; 
     324  margin: 1em 1em 0 0; 
     325  padding: 0.5em; 
     326  border: 1px solid #ccc; 
    324327} 
    325328#bwSubmittedEventCommentBlock td { 
    326   padding-left: 2em; 
     329  padding: 0 3em 0 1em; 
     330
     331#bwSubmittedEventCommentBlock th { 
     332  padding: 0 3em 0 0; 
     333
     334#bwSubmittedEventCommentBlock p { 
     335  padding-top: 1em; 
     336  clear: both; 
    327337} 
    328338#bwSubmittedEventCommentBlock a.toggle { 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1673 r1674  
    980980            <xsl:if test="form/calendar/preferred/select/option"> 
    981981              <select name="prefCalendarId"> 
    982                 <option value=""> 
     982                <option> 
     983                  <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    983984                  Select preferred: 
    984985                </option> 
     
    995996            </xsl:if> 
    996997            <select name="calendarId"> 
    997               <option value=""> 
     998              <option> 
     999                <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    9981000                Select: 
    9991001              </option> 
     
    21852187      <tr> 
    21862188        <xsl:choose> 
    2187           <xsl:when test="starts-with(form/calendar/all/select/option[@selected],$submissionsRootUnencoded)"> 
     2189          <xsl:when test="starts-with(form/calendar/path,$submissionsRootUnencoded)"> 
    21882190            <td> 
    21892191              <input type="submit" name="updateSubmitEvent" value="Update Event"/> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r1673 r1674  
    239239// ======================================================================== 
    240240 
    241 /* An comment accompanying a submitted event 
     241/* A comment accompanying a submitted event. 
    242242/* comment: the x-property string X-BEDEWORK-SUBMIT-COMMENT, tab delimited 
    243243 */ 
    244244function bwSubmitComment(comment) { 
    245   var commentVals = comment.split('\t'); 
    246   this.locationAddress = commentVals[0]; 
    247   this.locationSubaddress = commentVals[1]; 
    248   this.locationUrl = commentVals[2]; 
    249   this.contactName = commentVals[3]; 
    250   this.contactPhone = commentVals[4]; 
    251   this.contactUrl = commentVals[5]; 
    252   this.contactEmail = commentVals[6]; 
    253   this.category = commentVals[7]; 
    254   this.notes = commentVals[8]; 
     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]; 
    255255 
    256256  this.render = function() { 
    257257    var output = ""; 
    258258    output += '<table>'; 
    259     output += '<tr><th colspan="2">Suggested Location:</th><th colspan="2">Suggested Contact:</th></tr>'; 
    260     output += '<tr><td>Address:</td><td>' + this.locationAddress + '</td><td>Name:</td><td>' + this.contactName + '</td></tr>'; 
    261     output += '<tr><td>Subaddress:</td><td>' + this.locationSubddress + '</td><td>Phone:</td><td>' + this.contactPhone + '</td></tr>'; 
    262     output += '<tr><td>URL:</td><td>' + this.locationUrl + '</td><td>URL:</td><td>' + this.contactUrl + '</td></tr>'; 
    263     output += '<tr><td colspan="2"></td><td>Email:</td><td>' + this.contactEmail + '</td></tr>'; 
    264     output += '<tr><th colspan="4">Notes:</th></tr>'; 
    265     output += '<tr><td colspan="4">' + this.notes + '</td></tr>'; 
     259    output += '<tr><th colspan="2">Suggested Location:</th></tr>'; 
     260    output += '<tr><td>Address:</td><td>' + this.locationAddress + '</td>'; 
     261    output += '<tr><td>Subaddress:</td><td>' + this.locationSubaddress + '</td>'; 
     262    output += '<tr><td>URL:</td><td>' + this.locationUrl + '</td>'; 
    266263    output += '</table>'; 
     264    output += '<table>'; 
     265    output += '<tr><th colspan="2">Suggested Contact:</th></tr>'; 
     266    output += '<tr><td>Name:</td><td>' + this.contactName + '</td></tr>'; 
     267    output += '<tr><td>Phone:</td><td>' + this.contactPhone + '</td></tr>'; 
     268    output += '<tr><td>URL:</td><td>' + this.contactUrl + '</td></tr>'; 
     269    output += '<tr><td>Email:</td><td>' + this.contactEmail + '</td></tr>'; 
     270    output += '</table>'; 
     271    output += '<p><strong>Notes:</strong><br/>'; 
     272    output += this.notes + '</p>'; 
    267273 
    268274    return output; 
     
    279285    commentWindow.document.open(); 
    280286    commentWindow.document.writeln("<html><head><title>Submitted Event Comments</title>"); 
    281     commentWindow.document.writeln('<style type="text/css">body{background-color: #ffe; color: black; padding: 1em; font-size: 0.9em; font-family: Arial,sans-serif;}th{text-align: left;}td{padding-left: 2em;}</style></head>'); 
    282     commentWindow.document.writeln("<body><h2>Comments from Submitter</h2>"); 
     287    commentWindow.document.writeln('<style type="text/css">'); 
     288    commentWindow.document.writeln('body{background-color: #ffe; color: black; padding: 1em; font-size: 0.9em; font-family: Arial,sans-serif;}'); 
     289    commentWindow.document.writeln('table{float: left; margin: 1em 1em 0 0; padding: 0.5em; border: 1px solid #ccc; font-size: 0.9em;}'); 
     290    commentWindow.document.writeln('th{text-align: left;}'); 
     291    commentWindow.document.writeln('td{padding-left: 2em;}'); 
     292    commentWindow.document.writeln('p{clear:both; padding-top: 1em;}'); 
     293    commentWindow.document.writeln('</style></head>'); 
     294    commentWindow.document.writeln("<body><h3>Comments from Submitter</h3>"); 
    283295    commentWindow.document.writeln(this.render()); 
    284296    commentWindow.document.writeln("</body></html>");