Changeset 1548

Show
Ignore:
Timestamp:
08/31/07 10:51:30
Author:
johnsa
Message:

admin client: allow for opening and closing of calendars when importing ical files and looking at calendar descriptions

Files:

Legend:

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

    r1532 r1548  
    130130  <xsl:variable name="calendar-setAccess" select="/bedeworkadmin/urlPrefixes/calendar/setAccess/a/@href"/> 
    131131  <xsl:variable name="calendar-openCloseMod" select="/bedeworkadmin/urlPrefixes/calendar/calOpenCloseMod/a/@href"/> 
     132  <xsl:variable name="calendar-openCloseSelect" select="/bedeworkadmin/urlPrefixes/calendar/calOpenCloseSelect/a/@href"/> 
     133  <xsl:variable name="calendar-openCloseDisplay" select="/bedeworkadmin/urlPrefixes/calendar/calOpenCloseDisplay/a/@href"/> 
    132134  <xsl:variable name="calendar-openCloseMove" select="/bedeworkadmin/urlPrefixes/calendar/calOpenCloseMove/a/@href"/> 
    133135  <xsl:variable name="calendar-move" select="/bedeworkadmin/urlPrefixes/calendar/move/a/@href"/> 
     
    30883090    </xsl:variable> 
    30893091    <li class="{$itemClass}"> 
     3092      <xsl:if test="calendarCollection='false'"> 
     3093        <!-- test the open state of the folder; if it's open, 
     3094             build a URL to close it and vice versa --> 
     3095        <xsl:choose> 
     3096          <xsl:when test="open = 'true'"> 
     3097            <a href="{$calendar-openCloseDisplay}&amp;calPath={$calPath}&amp;open=false"> 
     3098              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3099            </a> 
     3100          </xsl:when> 
     3101          <xsl:otherwise> 
     3102            <a href="{$calendar-openCloseDisplay}&amp;calPath={$calPath}&amp;open=true"> 
     3103              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3104            </a> 
     3105          </xsl:otherwise> 
     3106        </xsl:choose> 
     3107      </xsl:if> 
    30903108      <a href="{$calendar-fetchForDisplay}&amp;calPath={$calPath}" title="display"> 
    30913109        <xsl:value-of select="name"/> 
     
    35243542      heirarchy.</li> 
    35253543    </ul> 
    3526  
    3527     <p> 
    3528       <strong>All Calendar Descriptions:</strong> 
    3529     </p> 
    3530     <table id="flatCalendarDescriptions" cellspacing="0"> 
    3531       <tr> 
    3532         <th>Name</th> 
    3533         <th>Description</th> 
    3534       </tr> 
    3535       <xsl:for-each select="//calendar"> 
    3536         <xsl:variable name="descClass"> 
    3537           <xsl:choose> 
    3538             <xsl:when test="position() mod 2 = 0">even</xsl:when> 
    3539             <xsl:otherwise>odd</xsl:otherwise> 
    3540           </xsl:choose> 
    3541         </xsl:variable> 
    3542         <tr class="{$descClass}"> 
    3543           <td> 
    3544             <xsl:value-of select="name"/> 
    3545           </td> 
    3546           <td> 
    3547             <xsl:value-of select="desc"/> 
    3548           </td> 
    3549         </tr> 
    3550       </xsl:for-each> 
    3551     </table> 
    35523544  </xsl:template> 
    35533545 
     
    36743666  </xsl:template> 
    36753667 
    3676   <xsl:template match="calendar" mode="selectCalForEventCalTree"> 
    3677     <xsl:variable name="id" select="id"/> 
    3678     <li> 
    3679       <xsl:attribute name="class"> 
     3668  <xsl:template match="calendar" mode="selectCalForEventCalTree">  
     3669    <xsl:variable name="calPath" select="path"/><!-- not the encodedPath when put in a form - otherwise it gets double encoded --> 
     3670      <xsl:variable name="calDisplay" select="path"/> 
     3671    <xsl:variable name="itemClass"> 
     3672      <xsl:choose> 
     3673        <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     3674        <xsl:otherwise>calendar</xsl:otherwise> 
     3675      </xsl:choose> 
     3676    </xsl:variable> 
     3677    <li class="{$itemClass}"> 
     3678      <xsl:if test="calendarCollection='false'"> 
     3679        <!-- test the open state of the folder; if it's open, 
     3680             build a URL to close it and vice versa --> 
    36803681        <xsl:choose> 
    3681           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    3682           <xsl:otherwise>calendar</xsl:otherwise> 
     3682          <xsl:when test="open = 'true'"> 
     3683            <a href="{$calendar-openCloseSelect}&amp;calPath={$calPath}&amp;open=false"> 
     3684              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
     3685            </a> 
     3686          </xsl:when> 
     3687          <xsl:otherwise> 
     3688            <a href="{$calendar-openCloseSelect}&amp;calPath={$calPath}&amp;open=true"> 
     3689              <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
     3690            </a> 
     3691          </xsl:otherwise> 
    36833692        </xsl:choose> 
    3684       </xsl:attribute> 
    3685       <xsl:variable name="calPath" select="path"/><!-- not the encodedPath when put in a form - otherwise it gets double encoded --> 
    3686       <xsl:variable name="calDisplay" select="path"/> 
     3693      </xsl:if> 
    36873694      <xsl:choose> 
    36883695        <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calendarCollection = 'true')"> 
     
    37023709        </ul> 
    37033710      </xsl:if> 
    3704     </li> 
     3711    </li>   
    37053712  </xsl:template> 
    37063713 
  • trunk/deployment/webadmin/webapp/resources/resources/bedework.js

    r1229 r1548  
    9595// editing, and importing events 
    9696function launchCalSelectWindow(URL) { 
    97   calSelect = window.open(URL, "calSelect", "width=500,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no"); 
     97  calSelect = window.open(URL, "calSelect", "width=700,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no"); 
    9898  window.calSelect.focus(); 
    9999}