Changeset 1726

Show
Ignore:
Timestamp:
01/30/08 17:34:36
Author:
johnsa
Message:

web clients: clean up setting of all day event
web submit: better support for multiple submission calendars

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.4.1/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1724 r1726  
    529529            <xsl:attribute name="class">selected</xsl:attribute> 
    530530          </xsl:if> 
    531           <a href="{$setup}">Event Management</a> 
     531          <a href="{$setup}&amp;listAllEvents=false">Event Management</a> 
    532532        </li> 
    533533        <li> 
     
    46554655 
    46564656    <p class="note"> 
    4657       Note: Views are cached.  Changes made here will not show up in the calendar suite until 
    4658       the cache is refreshed or you start a new session (e.g. clear your cookies). 
    4659       Deleting a view on a production system should be followed by a server restart to clear the cache for all users. 
     4657      Note: In some configurations, changes made here will not show up in the calendar suite until 
     4658      the cache is flushed (approx. 5 minutes) or you start a new session (e.g. clear your cookies). 
     4659      Deleting a view on a production system should be followed by a server restart to clear the cache for all users. 
    46604660    </p> 
    46614661 
  • releases/bedework-3.4.1/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js

    r1690 r1726  
    339339  allDayStartDateField = document.getElementById("allDayStartDateField"); 
    340340  allDayEndDateField = document.getElementById("allDayEndDateField"); 
     341  durDays = document.getElementById("durationDays"); 
    341342  if (obj.checked) { 
    342     //lets keep it simple for now: just show or hide time fields 
     343    // show or hide time fields and set the days duration 
    343344    changeClass('startTimeFields','invisible'); 
    344345    changeClass('endTimeFields','invisible'); 
     
    346347    allDayStartDateField.value = "true"; 
    347348    allDayEndDateField.value = "true"; 
     349    durDays.value = 1; 
    348350  } else { 
    349351    changeClass('startTimeFields','timeFields'); 
     
    352354    allDayStartDateField.value = "false"; 
    353355    allDayEndDateField.value = "false"; 
     356    durDays.value = 0; 
    354357  } 
    355358} 
  • releases/bedework-3.4.1/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1684 r1726  
    468468          <!-- ======== --> 
    469469          <!--  the string "user/" should not be hard coded; fix this --> 
    470           <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    471           <xsl:variable name="writableCalendars"> 
    472             <xsl:value-of select=" 
    473               count(/bedework/myCalendars//calendar[calType = '1' and 
    474                      currentAccess/current-user-privilege-set/privilege/write-content]) + 
    475               count(/bedework/mySubscriptions//calendar[calType = '1' and 
    476                      currentAccess/current-user-privilege-set/privilege/write-content and 
    477                      (not(contains(path,$userPath)))])"/> 
     470          <xsl:variable name="submissionCalendars"> 
     471            <xsl:value-of select="count(/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']) = '1'"/> 
    478472          </xsl:variable> 
    479473          <tr> 
    480             <xsl:if test="$writableCalendars = 1"> 
     474            <xsl:if test="$submissionCalendars = 1"> 
    481475              <xsl:attribute name="class">invisible</xsl:attribute> 
    482476              <!-- hide this row altogether if there is only one calendar; if you want the calendar 
     
    488482            <td class="fieldval"> 
    489483              <xsl:choose> 
    490                 <xsl:when test="$writableCalendars = 1"> 
     484                <xsl:when test="$submissionCalendars = 1"> 
    491485                  <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> 
    492                   <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
    493                            currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
    494                          currentAccess/current-user-privilege-set/privilege/write-content and 
    495                          (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    496  
     486                  <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']/path"/></xsl:variable> 
    497487                  <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    498488 
    499                   <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    500489                  <span id="bwEventCalDisplay"> 
    501                     <xsl:choose> 
    502                       <xsl:when test="contains($newCalPath,$userFullPath)"> 
    503                         <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
    504                       </xsl:when> 
    505                       <xsl:otherwise> 
    506                         <xsl:value-of select="$newCalPath"/> 
    507                       </xsl:otherwise> 
    508                     </xsl:choose> 
     490                    <xsl:value-of select="$newCalPath"/> 
    509491                  </span> 
    510492                </xsl:when> 
    511493                <xsl:otherwise> 
    512                   <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
    513                     <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    514                   </input> 
    515  
    516                   <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    517                   <span id="bwEventCalDisplay"> 
    518                     <xsl:choose> 
    519                       <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
    520                         <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
    521                       </xsl:when> 
    522                       <xsl:otherwise> 
    523                         <xsl:value-of select="form/calendar/path"/> 
    524                       </xsl:otherwise> 
    525                     </xsl:choose> 
    526                     <xsl:text> </xsl:text> 
    527                     <!-- this final text element is required to avoid an empty 
    528                          span element which is improperly rendered in the browser --> 
    529                   </span> 
    530  
     494                  <select name="newCalPath" id="bwNewCalPathField"> 
     495                    <xsl:for-each select="/bedework/myCalendars//calendar[starts-with(path,/bedework/submissionsRoot/unencoded) and calType='1']"> 
     496                      <option> 
     497                        <xsl:attribute name="value"><xsl:value-of select="/bedework/submissionsRoot/unencoded"/></xsl:attribute> 
     498                        <xsl:value-of select="substring-after(substring-after(path,/bedework/submissionsRoot/unencoded),'/')"/> 
     499                      </option> 
     500                    </xsl:for-each> 
     501                  </select> 
    531502                </xsl:otherwise> 
    532503              </xsl:choose> 
  • releases/bedework-3.4.1/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkEventForm.js

    r1682 r1726  
    323323  allDayStartDateField = document.getElementById("allDayStartDateField"); 
    324324  allDayEndDateField = document.getElementById("allDayEndDateField"); 
     325  durDays = document.getElementById("durationDays"); 
    325326  if (obj.checked) { 
    326     //lets keep it simple for now: just show or hide time fields 
     327    // show or hide time fields and set the days duration 
    327328    changeClass('startTimeFields','invisible'); 
    328329    changeClass('endTimeFields','invisible'); 
     
    330331    allDayStartDateField.value = "true"; 
    331332    allDayEndDateField.value = "true"; 
     333    durDays.value = 1; 
    332334  } else { 
    333335    changeClass('startTimeFields','timeFields'); 
     
    336338    allDayStartDateField.value = "false"; 
    337339    allDayEndDateField.value = "false"; 
     340    durDays.value = 0; 
    338341  } 
    339342} 
  • releases/bedework-3.4.1/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js

    r1513 r1726  
    261261  allDayStartDateField = document.getElementById("allDayStartDateField"); 
    262262  allDayEndDateField = document.getElementById("allDayEndDateField"); 
    263   if (obj.checked) { 
    264     //lets keep it simple for now: just show or hide time fields 
     263  durDays = document.getElementById("durationDays"); 
     264  if (obj.checked) { 
     265    // show or hide time fields and set the days duration 
    265266    changeClass('startTimeFields','invisible'); 
    266267    changeClass('endTimeFields','invisible'); 
     
    268269    allDayStartDateField.value = "true"; 
    269270    allDayEndDateField.value = "true"; 
     271    durDays.value = 1; 
    270272  } else { 
    271273    changeClass('startTimeFields','timeFields'); 
     
    274276    allDayStartDateField.value = "false"; 
    275277    allDayEndDateField.value = "false"; 
     278    durDays.value = 0; 
    276279  } 
    277280}