Changeset 1682

Show
Ignore:
Timestamp:
12/19/07 01:00:44
Author:
johnsa
Message:

web submit: make "my pending events" editable
admin client: display more user friendly name for submissions calendar in pull down list

Files:

Legend:

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

    r1680 r1682  
    245245      </xsl:when> 
    246246      <xsl:when test="id='org.bedework.validation.error.insubmissionscalendar'"> 
    247         Error: to publish this event, please select a public calendar 
     247        To publish this event, you must move it off the submitted events calendar onto a public calendar. 
    248248      </xsl:when> 
    249249 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1681 r1682  
    891891      <tr> 
    892892        <th>Title</th> 
    893         <th>Start Date</th> 
    894         <th>End Date</th> 
     893        <th>Start</th> 
     894        <th>End</th> 
    895895        <xsl:choose> 
    896896          <xsl:when test="$pending = 'true'"> 
     
    10441044                    <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
    10451045                    <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1046                     <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1046                    <xsl:choose> 
     1047                      <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1048                        submitted events 
     1049                      </xsl:when> 
     1050                      <xsl:otherwise> 
     1051                        <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1052                      </xsl:otherwise> 
     1053                    </xsl:choose> 
    10471054                  </option> 
    10481055                </xsl:for-each> 
     
    10591066                <option> 
    10601067                  <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> 
    1061                     <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1062                   <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1068                  <xsl:if test="@selected"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     1069                  <xsl:choose> 
     1070                    <xsl:when test="starts-with(node(),/bedework/submissionsRoot/unencoded)"> 
     1071                      submitted events 
     1072                    </xsl:when> 
     1073                    <xsl:otherwise> 
     1074                      <xsl:value-of select="substring-after(node(),'/public/')"/> 
     1075                    </xsl:otherwise> 
     1076                  </xsl:choose> 
    10631077                </option> 
    10641078              </xsl:for-each> 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1680 r1682  
    7575  <xsl:variable name="initEvent" select="/bedework/urlPrefixes/event/initEvent"/> 
    7676  <xsl:variable name="initPendingEvents" select="/bedework/urlPrefixes/event/initPendingEvents"/> 
    77   <xsl:variable name="event-fetchForUpdate" select="/bedework/urlPrefixes/event/fetchForUpdate/a/@href"/> 
    7877  <xsl:variable name="addEvent" select="/bedework/urlPrefixes/event/addEvent"/> 
    7978  <xsl:variable name="editEvent" select="/bedework/urlPrefixes/event/editEvent"/> 
     
    106105      </head> 
    107106      <body> 
     107        <xsl:if test="/bedework/page = 'editEvent' and 
     108                      normalize-space(/bedework/formElements/form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value) != ''"> 
     109          <xsl:attribute name="onload">getComments('standardForm','<xsl:value-of select="/bedework/formElements/form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value"/>');</xsl:attribute> 
     110        </xsl:if> 
    108111        <div id="bedework"><!-- main wrapper div --> 
    109112          <xsl:call-template name="header"/> 
     
    355358        </table> 
    356359      </xsl:if> 
    357  
    358       <!-- event form submenu --> 
    359  
    360       <!-- 
    361       <ul id="eventFormTabs" class="submenu"> 
    362         <li class="selected"> 
    363           <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Details'); hide('bwEventTab-Location','bwEventTab-Categories','bwEventTab-Contact');"> 
    364             1. details 
    365           </a> 
    366         </li> 
    367         <li> 
    368           <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Location'); hide('bwEventTab-Details','bwEventTab-Categories','bwEventTab-Contact');"> 
    369             2. location 
    370           </a> 
    371         </li> 
    372         <li> 
    373           <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Contact'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Categories');"> 
    374             3. contact 
    375           </a> 
    376         </li> 
    377         <li> 
    378           <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Categories'); hide('bwEventTab-Details','bwEventTab-Location','bwEventTab-Contact');"> 
    379             4. categories 
    380           </a> 
    381         </li> 
    382       </ul> 
    383     --> 
    384360 
    385361    <div id="instructions"> 
     
    886862                </xsl:when> 
    887863                <xsl:otherwise> 
    888                   <textarea name="description" cols="60" rows="4" id="bwEventDescription"> 
     864                  <textarea name="description" cols="60" rows="4" id="bwEventDesc"> 
    889865                    <xsl:value-of select="form/desc/textarea"/> 
    890866                  </textarea> 
     
    13321308        <th>Title</th> 
    13331309        <!-- <th>Submitted</th> --> 
    1334         <th>Start Date</th> 
    1335         <th>End Date</th> 
     1310        <th>Start</th> 
     1311        <th>End</th> 
    13361312        <th>Categories</th> 
    13371313        <th>Description</th> 
     
    13451321        <tr> 
    13461322          <td> 
    1347             <a href="{$event-fetchForUpdate}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     1323            <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13481324              <xsl:choose> 
    13491325                <xsl:when test="summary != ''"> 
     
    13811357                Recurring event. 
    13821358                Edit: 
    1383                 <a href="{$event-fetchForUpdate}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
     1359                <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}"> 
    13841360                  master 
    13851361                </a> | 
    1386                 <a href="{$event-fetchForUpdate}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     1362                <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    13871363                  instance 
    13881364                </a> 
  • trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkEventForm.js

    r1673 r1682  
    242242function setEventFields(formObj) { 
    243243  setDates(formObj); 
    244   setComment(formObj); 
     244  setComments(formObj); 
    245245  setRecurrence(formObj); 
    246246  setAccessHow(formObj,1); 
     
    260260  formObj["eventEndDate.day"].value = endDate.getDate(); 
    261261} 
    262 function setComment(formObj) { 
     262function setComments(formObj) { 
    263263  // set the submission comments (location, contact, and category suggestions) 
    264264  // in a parsable format that can be filtered on output. 
     
    276276 
    277277  formObj["xbwsubmitcomment"].value = comment; 
     278} 
     279function getComments(formId,comment) { 
     280  // get the submission comments (location, contact, and category suggestions) 
     281  // and load them into the form 
     282  var formObj = document.getElementById(formId); 
     283 
     284  var commentVals = comment.split("\t"); 
     285  formObj["commentLocationAddress"].value = (commentVals[0] == undefined) ? "" : commentVals[0]; 
     286  formObj["commentLocationSubaddress"].value = (commentVals[2] == undefined) ? "" : commentVals[2]; 
     287  formObj["commentLocationURL"].value = (commentVals[2] == undefined) ? "" : commentVals[2]; 
     288  formObj["commentContactName"].value = (commentVals[3] == undefined) ? "" : commentVals[3]; 
     289  formObj["commentContactPhone"].value = (commentVals[4] == undefined) ? "" : commentVals[4]; 
     290  formObj["commentContactURL"].value = (commentVals[5] == undefined) ? "" : commentVals[5]; 
     291  formObj["commentContactEmail"].value = (commentVals[6] == undefined) ? "" : commentVals[6]; 
     292  formObj["commentCategories"].value = (commentVals[7] == undefined) ? "" : commentVals[7]; 
     293  formObj["commentNotes"].value = (commentVals[8] == undefined) ? "" : commentVals[8]; 
    278294} 
    279295// create table of form fields for review