Changeset 2123

Show
Ignore:
Timestamp:
04/10/09 00:54:47
Author:
johnsa
Message:

admin client: addition of default categories to calendar suite prefs
user client: fix selection of calendar for event
public client: fix display of "all calendars"

Files:

Legend:

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

    r2122 r2123  
    310310          <link rel="stylesheet" href="{$resourcesRoot}/resources/calendarDescriptions.css"/> 
    311311        </xsl:if> 
    312         <xsl:if test="/bedework/page='addFilter'"> 
     312        <xsl:if test="/bedework/page='addFilter' or 
     313                      /bedework/page='calSuitePrefs'"> 
    313314          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    314315        </xsl:if> 
     
    669670          </a> 
    670671        </td> 
    671         <!-- 
    672           Category management is becomeing a  super-user and calsuite admin feature; 
    673           Categories underly much of the new single calendar and filtering model. 
    674         <td> 
    675           <a id="addCategoryLink" href="{$category-initAdd}"> 
    676             <img src="{$resourcesRoot}/resources/bwAdminAddCategoryIcon.jpg" width="100" height="100" alt="Add Event" border="0"/> 
    677             <br/>Add Category 
    678           </a> 
    679         </td> --> 
     672        <xsl:if test="/bedework/currentCalSuite/group = /bedework/userInfo/group"> 
     673          <xsl:if test="/bedework/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedework/userInfo/superUser = 'true'"> 
     674            <!-- 
     675              Category management is a  super-user and calsuite admin feature; 
     676              Categories underly much of the new single calendar and filtering model.--> 
     677            <td> 
     678              <a id="addCategoryLink" href="{$category-initAdd}"> 
     679                <img src="{$resourcesRoot}/resources/bwAdminAddCategoryIcon.jpg" width="100" height="100" alt="Add Event" border="0"/> 
     680                <br/>Add Category 
     681              </a> 
     682            </td> 
     683          </xsl:if> 
     684        </xsl:if> 
    680685      </tr> 
    681686      <tr> 
     
    698703          </a> 
    699704        </td> 
    700         <!-- 
    701           Category management is becomeing a super-user and calsuite admin feature; 
    702           Categories underly much of the new single calendar and filtering model. 
    703         <td> 
    704           <a href="{$category-initUpdate}"> 
    705             <img src="{$resourcesRoot}/resources/bwAdminManageCatsIcon.jpg" width="100" height="73" alt="Manage Categories" border="0"/> 
    706             <br/>Manage Categories 
    707           </a> 
    708         </td> --> 
     705        <xsl:if test="/bedework/currentCalSuite/group = /bedework/userInfo/group"> 
     706          <xsl:if test="/bedework/currentCalSuite/currentAccess/current-user-privilege-set/privilege/write or /bedework/userInfo/superUser = 'true'"> 
     707            <!-- 
     708              Category management is a super-user and calsuite admin feature; 
     709              Categories underly much of the new single calendar and filtering model.--> 
     710            <td> 
     711              <a href="{$category-initUpdate}"> 
     712                <img src="{$resourcesRoot}/resources/bwAdminManageCatsIcon.jpg" width="100" height="73" alt="Manage Categories" border="0"/> 
     713                <br/>Manage Categories 
     714              </a> 
     715            </td> 
     716          </xsl:if> 
     717        </xsl:if> 
    709718      </tr> 
    710719    </table> 
     
    32193228              </td> 
    32203229              <td> 
    3221                 <textarea name="categoryDesc.value" rows="3" cols="60"></textarea> 
     3230                <textarea name="categoryDesc.value" rows="3" cols="60"> 
     3231                  <xsl:text> </xsl:text> 
     3232                </textarea> 
    32223233              </td> 
    32233234            </tr> 
     
    32533264                <textarea name="categoryDesc.value" rows="3" cols="60"> 
    32543265                  <xsl:value-of select="normalize-space(/bedework/currentCategory/category/desc)"/> 
     3266                  <xsl:if test="/bedework/currentCategory/category/desc = ''"><xsl:text> </xsl:text></xsl:if> 
    32553267                </textarea> 
    32563268              </td> 
     
    52515263    <h2>Edit Calendar Suite Preferences</h2> 
    52525264    <form name="userPrefsForm" method="post" action="{$calsuite-updatePrefs}"> 
    5253       <table id="eventFormTable"> 
    5254         <tr> 
    5255           <td class="fieldName"
     5265      <table class="common2"> 
     5266        <tr> 
     5267          <th
    52565268            Calendar Suite: 
    5257           </td
     5269          </th
    52585270          <td> 
    52595271            <xsl:value-of select="/bedework/currentCalSuite/name"/> 
     
    52615273        </tr> 
    52625274        <tr> 
    5263           <td class="fieldName"
     5275          <th
    52645276            Preferred view: 
    5265           </td
     5277          </th
    52665278          <td> 
    52675279            <xsl:variable name="preferredView" select="/bedework/prefs/preferredView"/> 
     
    52705282        </tr> 
    52715283        <tr> 
    5272           <td class="fieldName"
     5284          <th
    52735285            Preferred view period: 
    5274           </td
     5286          </th
    52755287          <td> 
    52765288            <xsl:variable name="preferredViewPeriod" select="/bedework/prefs/preferredViewPeriod"/> 
     
    53195331              </xsl:choose> 
    53205332            </select> 
     5333          </td> 
     5334        </tr> 
     5335        <tr> 
     5336          <th>Default Categories:</th> 
     5337          <td> 
     5338            <!-- show the selected categories - in this case, iterate over 
     5339                 the "all" listing and reveal those that have been selected; 
     5340                 in this case, we have only the uids to go by, so we need to 
     5341                 match them up --> 
     5342            <ul class="catlist"> 
     5343              <xsl:for-each select="/bedework/categories/all/category"> 
     5344                <xsl:sort select="keyword" order="ascending"/> 
     5345                <xsl:if test="uid = /bedework/categories/current//category/uid"> 
     5346                  <li> 
     5347                    <input type="checkbox" name="defaultCategory" checked="checked"> 
     5348                      <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     5349                    </input> 
     5350                    <xsl:value-of select="keyword"/> 
     5351                  </li> 
     5352                </xsl:if> 
     5353              </xsl:for-each> 
     5354            </ul> 
     5355            <a href="javascript:toggleVisibility('calCategories','visible')"> 
     5356              show/hide unused categories 
     5357            </a> 
     5358            <div id="calCategories" class="invisible"> 
     5359              <ul class="catlist"> 
     5360                <xsl:for-each select="/bedework/categories/all/category"> 
     5361                  <xsl:sort select="keyword" order="ascending"/> 
     5362                  <!-- don't duplicate the selected categories --> 
     5363                  <xsl:if test="not(keyword = ../../current//category/keyword)"> 
     5364                    <li> 
     5365                      <input type="checkbox" name="defaultCategory"> 
     5366                        <xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute> 
     5367                      </input> 
     5368                      <xsl:value-of select="keyword"/> 
     5369                    </li> 
     5370                  </xsl:if> 
     5371                </xsl:for-each> 
     5372              </ul> 
     5373            </div> 
    53215374          </td> 
    53225375        </tr> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r2116 r2123  
    14411441        <td class="leftCell"> 
    14421442          <ul class="calendarTree"> 
    1443             <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1443            <xsl:apply-templates select="calendar/calendar[(calType = 0 or calType = 7 or calType = 8) and position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    14441444          </ul> 
    14451445        </td> 
    14461446        <td> 
    14471447          <ul class="calendarTree"> 
    1448             <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1448            <xsl:apply-templates select="calendar/calendar[(calType = 0 or calType = 7 or calType = 8) and position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    14491449          </ul> 
    14501450        </td> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl

    r2117 r2123  
    12861286        <td class="leftCell"> 
    12871287          <ul class="calendarTree"> 
    1288             <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1288            <xsl:apply-templates select="calendar/calendar[(calType = 0 or calType = 7 or calType = 8) and position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    12891289          </ul> 
    12901290        </td> 
    12911291        <td> 
    12921292          <ul class="calendarTree"> 
    1293             <xsl:apply-templates select="calendar/calendar[calType != 5 and calType != 6 and calType != 2 and calType != 3 and position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
     1293            <xsl:apply-templates select="calendar/calendar[(calType = 0 or calType = 7 or calType = 8) and position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/> 
    12941294          </ul> 
    12951295        </td> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.css

    r2117 r2123  
    16311631} 
    16321632#bedework img.bwCalendarColor { 
    1633   float: right; 
    1634   clear: right; 
    1635   padding: 0; 
    1636   margin: 5px 10px 0 2px; 
    1637   width: 0.6em; 
    1638   height: 0.5em; 
     1633  padding: 0; 
     1634  margin: 5px 0 0 5px; 
     1635  width: 6px; 
     1636  height: 6px; 
    16391637  border: 1px solid #666 !important; 
    16401638} 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r2122 r2123  
    44924492        </xsl:choose> 
    44934493      </xsl:attribute> 
    4494       <xsl:if test="color != '' and color != 'null'"> 
    4495         <!-- the spacer gif approach allows us to avoid some IE misbehavior --> 
    4496         <xsl:variable name="color" select="color"/> 
    4497         <img src="{$resourcesRoot}/resources/spacer.gif" width="6" height="6" alt="calendar color" class="bwCalendarColor" style="background-color: {$color}; color:black;"/> 
    4498       </xsl:if> 
    44994494      <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    45004495        <form name="bwHideDisplayCal" class="bwHideDisplayCal" method="post"> 
     
    45314526        <xsl:value-of select="name"/> 
    45324527      </a> 
     4528      <xsl:if test="color != '' and color != 'null'"> 
     4529        <!-- the spacer gif approach allows us to avoid some IE misbehavior --> 
     4530        <xsl:variable name="color" select="color"/> 
     4531        <img src="{$resourcesRoot}/resources/spacer.gif" width="6" height="6" alt="calendar color" class="bwCalendarColor" style="background-color: {$color}; color:black;"/> 
     4532      </xsl:if> 
    45334533      <xsl:if test="calendar"> 
    45344534        <ul> 
     
    46804680      <ul class="calendarTree"> 
    46814681        <xsl:choose> 
    4682           <xsl:when test="/bedework/myCalendars/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]"> 
    4683             <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]" mode="selectCalForEventCalTree"> 
     4682          <xsl:when test="/bedework/formElements/form/calendars/select/option"> 
     4683            <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar" mode="selectCalForEventCalTree"> 
    46844684              <xsl:sort select="name" order="ascending" case-order="upper-first"/> 
    46854685            </xsl:apply-templates> 
     
    47194719      </xsl:variable> 
    47204720      <xsl:choose> 
    4721         <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calType != '0')"> 
     4721        <xsl:when test="path = /bedework/formElements/form/calendars/select//option/@value and (calType != '0')"> 
    47224722          <a href="javascript:updateEventFormCalendar('{$calPath}','{$calDisplay}')"> 
    47234723            <strong><xsl:value-of select="name"/></strong> 
    47244724          </a> 
    4725           <!-- deprecated: 
    4726           <xsl:if test="name != $calDisplay"> 
    4727             <span class="small"> (<xsl:value-of select="$calDisplay"/>)</span> 
    4728           </xsl:if> --> 
    47294725        </xsl:when> 
    47304726        <xsl:otherwise>