Changeset 412

Show
Ignore:
Timestamp:
04/21/06 14:33:38
Author:
johnsa
Message:

fixed up calendar switching and selection in add and edit events; added ability to set "affects free/busy" flag on subscription

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r410 r412  
    16941694          </td> 
    16951695          <td class="fieldval"> 
    1696             <select name="subname"> 
     1696            <select name="calId"> 
    16971697              <option value="-1"> 
    16981698                Select: 
     
    17031703              <xsl:for-each select="/bedework/myCalendars//calendar[calendarCollection='true']"> 
    17041704                <xsl:variable name="id" select="id"/> 
    1705                 <option value="{$id}"><xsl:value-of select="name"/></option> 
     1705                <xsl:choose> 
     1706                  <xsl:when test="id = /bedework/formElements/calendarId"> 
     1707                    <option value="{$id}" selected="selected"><xsl:value-of select="name"/></option> 
     1708                  </xsl:when> 
     1709                  <xsl:otherwise> 
     1710                    <option value="{$id}"><xsl:value-of select="name"/></option> 
     1711                  </xsl:otherwise> 
     1712                </xsl:choose> 
    17061713              </xsl:for-each> 
    17071714            </select> 
     
    21912198  </xsl:template> 
    21922199 
     2200  <xsl:template match="calendar" mode="myCalendars"> 
     2201    <!-- supress Inbox and Outbox for the moment --> 
     2202    <xsl:if test="(name != 'Inbox') and (name != 'Outbox') and (name != 'Deleted')"> 
     2203      <xsl:variable name="id" select="id"/> 
     2204      <xsl:variable name="itemClass"> 
     2205        <xsl:choose> 
     2206          <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
     2207                          and name = /bedework/selectionState/subscriptions/subscription/calendar/name">selected</xsl:when> 
     2208          <xsl:when test="name='Trash'">trash</xsl:when> 
     2209          <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     2210          <xsl:otherwise>calendar</xsl:otherwise> 
     2211        </xsl:choose> 
     2212      </xsl:variable> 
     2213      <li class="{$itemClass}"> 
     2214        <xsl:variable name="url" select="path"/> 
     2215        <a href="{$setSelection}?calUrl={$url}"> 
     2216          <xsl:value-of select="name"/> 
     2217        </a> 
     2218        <xsl:if test="calendar"> 
     2219          <ul> 
     2220            <xsl:apply-templates select="calendar" mode="myCalendars"/> 
     2221          </ul> 
     2222        </xsl:if> 
     2223      </li> 
     2224    </xsl:if> 
     2225  </xsl:template> 
     2226 
    21932227  <xsl:template match="calendar" mode="listForUpdate"> 
    2194     <xsl:if test="(name != 'Inbox') and (name != 'Outbox')"> 
     2228    <xsl:if test="(name != 'Inbox') and (name != 'Outbox') and (name != 'Deleted')"> 
    21952229      <xsl:variable name="id" select="id"/> 
    21962230      <xsl:variable name="itemClass"> 
     
    22222256 
    22232257  <xsl:template match="calendar" mode="listForDisplay"> 
    2224     <xsl:if test="(name != 'Inbox') and (name != 'Outbox')"> 
     2258    <xsl:if test="(name != 'Inbox') and (name != 'Outbox') and (name != 'Deleted')"> 
    22252259      <xsl:variable name="id" select="id"/> 
    22262260      <xsl:variable name="itemClass"> 
     
    24802514      </tr> 
    24812515      <xsl:for-each select="//calendar"> 
    2482         <xsl:if test="(name != 'Inbox') and (name != 'Outbox')"> 
     2516        <xsl:if test="(name != 'Inbox') and (name != 'Outbox') and (name != 'Deleted')"> 
    24832517          <xsl:variable name="descClass"> 
    24842518            <xsl:choose> 
     
    26352669 
    26362670  <xsl:template match="calendar" mode="subscribe"> 
    2637     <xsl:variable name="id" select="id"/> 
    2638     <xsl:variable name="itemClass"> 
    2639       <xsl:choose> 
    2640         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    2641         <xsl:otherwise>calendar</xsl:otherwise> 
    2642       </xsl:choose> 
    2643     </xsl:variable> 
    2644     <li class="{$itemClass}"> 
    2645       <a href="{$subscriptions-initAdd}&amp;calId={$id}"> 
    2646         <xsl:value-of select="name"/> 
    2647       </a> 
    2648       <xsl:if test="calendar"> 
    2649         <ul> 
    2650           <xsl:apply-templates select="calendar" mode="subscribe"> 
    2651             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
    2652           </xsl:apply-templates> 
    2653         </ul> 
    2654       </xsl:if> 
    2655     </li> 
    2656   </xsl:template> 
    2657  
    2658   <xsl:template match="calendar" mode="myCalendars"> 
    2659     <!-- supress Inbox and Outbox for the moment --> 
    2660     <xsl:if test="(name != 'Inbox') and (name != 'Outbox')"> 
     2671    <xsl:if test="(name != 'Inbox') and (name != 'Outbox') and (name != 'Deleted')"> 
    26612672      <xsl:variable name="id" select="id"/> 
    26622673      <xsl:variable name="itemClass"> 
    26632674        <xsl:choose> 
    2664           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    2665                           and name = /bedework/selectionState/subscriptions/subscription/calendar/name">selected</xsl:when> 
    2666           <xsl:when test="name='Trash'">trash</xsl:when> 
    26672675          <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    26682676          <xsl:otherwise>calendar</xsl:otherwise> 
     
    26702678      </xsl:variable> 
    26712679      <li class="{$itemClass}"> 
    2672         <xsl:variable name="url" select="path"/> 
    2673         <a href="{$setSelection}?calUrl={$url}"> 
     2680        <a href="{$subscriptions-initAdd}&amp;calId={$id}"> 
    26742681          <xsl:value-of select="name"/> 
    26752682        </a> 
    26762683        <xsl:if test="calendar"> 
    26772684          <ul> 
    2678             <xsl:apply-templates select="calendar" mode="myCalendars"/> 
     2685            <xsl:apply-templates select="calendar" mode="subscribe"> 
     2686              <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
     2687            </xsl:apply-templates> 
    26792688          </ul> 
    26802689        </xsl:if> 
     
    27092718            <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
    27102719            <input type="radio" value="false" name="subscription.display"/> no 
     2720          </td> 
     2721        </tr> 
     2722        <tr> 
     2723          <td class="fieldname">Affects Free/Busy:</td> 
     2724          <td> 
     2725            <input type="radio" value="true" name="subscription.affectsFreeBusy" checked="checked"/> yes 
     2726            <input type="radio" value="false" name="subscription.affectsFreeBusy"/> no 
    27112727          </td> 
    27122728        </tr> 
     
    27852801        </tr> 
    27862802        <tr> 
     2803          <td class="fieldname">Affects Free/Busy:</td> 
     2804          <td> 
     2805            <xsl:choose> 
     2806              <xsl:when test="affectsFreeBusy='true'"> 
     2807                <input type="radio" value="true" name="subscription.affectsFreeBusy" checked="checked"/> yes 
     2808                <input type="radio" value="false" name="subscription.affectsFreeBusy"/> no 
     2809              </xsl:when> 
     2810              <xsl:otherwise> 
     2811                <input type="radio" value="true" name="subscription.affectsFreeBusy"/> yes 
     2812                <input type="radio" value="false" name="subscription.affectsFreeBusy" checked="checked"/> no 
     2813              </xsl:otherwise> 
     2814            </xsl:choose> 
     2815          </td> 
     2816        </tr> 
     2817        <tr> 
    27872818          <td class="fieldname">Style:</td> 
    27882819          <td> 
     
    28302861        <th>Style</th> 
    28312862        <th>Display</th> 
     2863        <th>Free/Busy</th> 
    28322864        <!--<th>Unremovable</th> 
    28332865        <th>External</th> 
     
    28512883          <td class="center"> 
    28522884            <xsl:if test="display='true'"> 
     2885              <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
     2886            </xsl:if> 
     2887          </td> 
     2888          <td class="center"> 
     2889            <xsl:if test="affectsFreeBusy='true'"> 
    28532890              <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    28542891            </xsl:if>