Changeset 2001

Show
Ignore:
Timestamp:
12/31/08 14:58:23
Author:
johnsa
Message:

admin client: more updates for new subscription model and views, updates to adming group listings

Files:

Legend:

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

    r1999 r2001  
    298298  padding: 0.25em 0 0 0; 
    299299} 
    300 ul.adminMenu a:link, 
    301 ul.adminMenu a:active, 
    302 ul.adminMenu a:visited { 
    303   text-decoration: none; 
    304   color: #483D8B; 
    305   background-color: transparent; 
    306 } 
    307 ul.adminMenu a:hover { 
    308   text-decoration: none; 
    309   color: #483D8B; 
    310   background-color: #ff3; 
    311 } 
    312300#bwSubmittedEventCommentBlock { 
    313301  font-size: 0.9em; 
     
    349337#commonListTable th { 
    350338  padding: 0.2em 1em 0.2em 0.5em; 
    351   background-color : #ccc
     339  background-color : #bbb
    352340  color: black; 
    353341  white-space: nowrap; 
     
    358346  padding: 0.2em 1em 0.2em 0.5em; 
    359347  color: black; 
    360   background-color: #eee
     348  background-color: #ddd
    361349} 
    362350#commonListTable td.date, 
     
    365353} 
    366354#commonListTable tr.highlight td { 
    367   background-color: #ffd; 
     355  background-color: #eee; 
     356  color: black; 
    368357} 
    369358.recurrenceEditLinks { 
     
    726715} 
    727716#sharingBox { 
    728   margin: 0; 
     717  margin: 1em 0; 
    729718  border-top: 1px solid #333; 
    730719  padding: 1em 1em 2em 1em; 
     
    932921  padding: 2em; 
    933922} 
    934 #calendarTree ul { 
     923.calendarTree ul { 
    935924  padding-left: 10px; 
    936925  margin-left: 10px; 
    937926} 
    938 #calendarTree li { 
     927.calendarTree li { 
    939928  padding-top: 0.25em; 
    940929  /*font-weight: bold;*/ 
    941930} 
    942 #calendarTree li.folder { 
     931li.folder { 
    943932  list-style-image: url(../../resources/catIcon.gif); 
    944933} 
    945 #calendarTree li.calendar { 
     934li.calendar { 
    946935  list-style-image: url(../../resources/calIcon-sm.gif); 
    947936} 
    948 #calendarTree  li.trash { 
     937.calendarTree  li.trash { 
    949938  list-style-image: url(../../resources/trashIcon.gif); 
    950939} 
    951 #calendarTree  li.inbox { 
     940.calendarTree  li.inbox { 
    952941  list-style-image: url(../../resources/inboxIcon.gif); 
    953942} 
    954 #calendarTree  li.outbox { 
     943.calendarTree  li.outbox { 
    955944  list-style-image: url(../../resources/outboxIcon.gif); 
    956945} 
    957 #calendarTree  li.deleted { 
     946.calendarTree  li.deleted { 
    958947  list-style-image: url(../../resources/calIconDeleted-sm.gif); 
    959948} 
    960 #calendarTree  li.selected { 
     949.calendarTree  li.selected { 
    961950  list-style-image: url(../../resources/glassFill-icon-view.gif); 
    962951  font-weight: bold; 
    963952} 
    964 #calendarTree  li.alias { 
     953.calendarTree  li.alias { 
    965954  list-style-image: url(../../resources/calIconAlias-sm.gif); 
    966955  font-style: italic; 
     
    968957  padding-left: 0; 
    969958} 
    970 #calendarTree  li.aliasFolder { 
     959.calendarTree  li.aliasFolder { 
    971960  list-style-image: url(../../resources/catIconAlias.gif); 
    972961  font-style: italic; 
     
    974963  padding-left: 0; 
    975964} 
    976 #calendarTree  li.subscription li { 
     965.calendarTree  li.subscription li { 
    977966  font-style: normal; 
    978967} 
    979 #calendarTree a:link, 
    980 #calendarTree a:active, 
    981 #calendarTree a:visited { 
    982   text-decoration: none; 
    983 
    984 #calendarTree a:hover { 
    985   color: black; 
    986   background-color: #ff3; 
    987 
    988 #calendarTree img.bwPlusMinusIcon { 
     968.calendarTree img.bwPlusMinusIcon { 
    989969  /* the arrangement below is required for cross-browser compatibility; 
    990970     be cautious changing it (works IE7, FF2, Safari 3) */ 
     
    993973  margin: 0 25px 0 -35px; 
    994974} 
     975#bwPublicCalDisplay { 
     976  margin: 1em 0 -1em 1em; 
     977} 
    995978#filterTable { 
    996979  font-size: 0.9em; 
     
    10531036.padTop { 
    10541037  padding-top: 1em; 
     1038} 
     1039.viewsTable { 
     1040  width: 60%; 
     1041} 
     1042a { 
     1043  color: #00c; 
     1044  background-color: inherit; 
     1045  text-decoration: none; 
     1046} 
     1047a:hover { 
     1048  color: #483D8B; 
     1049  background-color: #ff3; 
    10551050} 
    10561051#footer { 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1999 r2001  
    275275          </script> 
    276276        </xsl:if> 
    277         <xsl:if test="/bedework/page='modCalendar' or /bedework/page='modCalSuite'"> 
     277        <xsl:if test="/bedework/page='modCalendar' or 
     278                      /bedework/page='modCalSuite' or 
     279                      /bedework/page='modSubscription'"> 
    278280          <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    279281          <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
     
    32113213        <td class="cals"> 
    32123214          <h3>Public calendars</h3> 
    3213           <ul id="calendarTree"> 
     3215          <ul class="calendarTree"> 
    32143216            <xsl:choose> 
    32153217              <xsl:when test="/bedework/page='calendarDescriptions' or /bedework/page='displayCalendar'"> 
     
    34373439      </div> 
    34383440      <div id="subscriptionTypes" class="invisible"> 
    3439         <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based 
    3440              on the subscription type. --> 
    3441         <input type="hidden" name="aliasUri" value=""/> 
    3442         <p> 
    3443           <strong>Subscription Type:</strong><br/> 
    3444           <!-- subType is defaulted to public.  It is changed when a subTypeSwitch is clicked. --> 
    3445           <input type="hidden" value="public" name="subType" id="bwSubType"/> 
    3446           <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> Public calendar (alias) 
    3447           <!-- input type="radio" name="subTypeSwitch" value="user" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','visible');setField('bwSubType',this.value);"/> User calendar--> 
    3448           <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> URL 
    3449         </p> 
    3450  
    3451         <div id="subscriptionTypePublic"> 
    3452           <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
    3453           <div id="bwPublicCalDisplay"> 
    3454             Select the public calendar or folder: 
    3455           </div> 
    3456           <ul id="publicSubscriptionTree"> 
    3457             <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
    3458           </ul> 
    3459         </div> 
    3460  
    3461         <div id="subscriptionTypeUser" class="invisible"> 
    3462           <table class="common"> 
    3463             <tr> 
    3464               <th>User's ID:</th> 
    3465               <td> 
    3466                 <input type="text" name="userIdHolder" value="" size="40"/> 
    3467               </td> 
    3468             </tr> 
    3469             <tr> 
    3470               <th>Calendar Path:</th> 
    3471               <td> 
    3472                 <input type="text" name="userCalHolder" value="calendar" size="40"/><br/> 
    3473                 <span class="note">E.g. "calendar" (default) or "someFolder/someCalendar"</span> 
    3474               </td> 
    3475             </tr> 
    3476           </table> 
    3477         </div> 
    3478  
    3479  
    3480         <div class="invisible" id="subscriptionTypeExternal"> 
    3481           <table class="common"> 
     3441        <h4>Subscription URL</h4> 
     3442        <div id="subscriptionTypeExternal"> 
     3443          <table class="common" id="subscriptionTypes"> 
    34823444            <tr> 
    34833445              <th>URL to calendar:</th> 
    34843446              <td> 
    3485                 <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
     3447                <input type="text" name="aliasUri" value="" size="40"/> 
    34863448              </td> 
    34873449            </tr> 
     
    34993461            </tr> 
    35003462          </table> 
     3463          <p> 
     3464            Note: An alias can be added to a Bedework calendar using a URL of the form:<br/> 
     3465            bwcal://[path], e.g. bwcal:///public/Arts 
     3466          </p> 
    35013467        </div> 
    35023468      </div> 
     
    36383604            <xsl:choose> 
    36393605              <xsl:when test="isSubscription='true'"> 
    3640                 <input type="submit" name="delete" value="Delete Subscription"/> 
     3606                <input type="submit" name="delete" value="Remove Subscription"/> 
    36413607              </xsl:when> 
    36423608              <xsl:when test="calType = '0'"> 
     
    37293695  <xsl:template match="currentCalendar" mode="deleteCalendarConfirm"> 
    37303696    <xsl:choose> 
     3697      <xsl:when test="isSubscription = 'true'"> 
     3698        <h3>Remove Subscription</h3> 
     3699        <p> 
     3700          The following subscription will be removed. 
     3701          Continue? 
     3702        </p> 
     3703      </xsl:when> 
    37313704      <xsl:when test="calType = '0'"> 
    37323705        <h3>Delete Folder</h3> 
     
    37793752          <td align="right"> 
    37803753            <xsl:choose> 
     3754              <xsl:when test="isSubscription = 'true'"> 
     3755                <input type="submit" name="delete" value="Yes: Remove Subscription!"/> 
     3756              </xsl:when> 
    37813757              <xsl:when test="calType = '0'"> 
    37823758                <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
     
    38133789      </form>--> 
    38143790      <h4>Calendars</h4> 
    3815       <ul id="calendarTree"> 
     3791      <ul class="calendarTree"> 
    38163792        <xsl:apply-templates select="/bedework/calendars/calendar" mode="selectCalForEventCalTree"/> 
    38173793      </ul> 
     
    39063882        <td class="bwCalsForMove"> 
    39073883          <p>Select a new parent folder:</p> 
    3908           <ul id="calendarTree"> 
     3884          <ul class="calendarTree"> 
    39093885            <xsl:apply-templates select="/bedework/calendars/calendar" mode="listForMove"/> 
    39103886          </ul> 
     
    43874363        <td class="cals"> 
    43884364          <h3>Subscription Tree</h3> 
    4389           <ul id="calendarTree"> 
     4365          <ul class="calendarTree"> 
    43904366            <xsl:apply-templates select="calendar" mode="listForUpdateSubscription"> 
    43914367              <xsl:with-param name="root">true</xsl:with-param> 
     
    44714447      <xsl:if test="calendar"> 
    44724448        <ul> 
    4473           <xsl:apply-templates select="calendar[isSubscription = 'true']" mode="listForUpdateSubscription"> 
    4474             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--></xsl:apply-templates> 
     4449          <xsl:apply-templates select="calendar[isSubscription = 'true']" mode="listForUpdateSubscription"/> 
    44754450        </ul> 
    44764451      </xsl:if> 
     
    44794454 
    44804455  <xsl:template match="currentCalendar" mode="addSubscription"> 
    4481     <h3>Add Subscription or Folder</h3> 
    4482     <form name="addCalForm" method="post" action="{$subscriptions-update}" onsubmit="setCalendarAlias(this)"> 
     4456    <h3>Add Subscription</h3> 
     4457    <form name="addCalForm" method="post" action="{$subscriptions-update}" onsubmit="return setCalendarAlias(this)"> 
    44834458      <table class="common"> 
    44844459        <tr> 
     
    45334508          <th>Type:</th> 
    45344509          <td> 
    4535             <!-- we will set the value of "calendarCollection on submit. 
    4536                  Value is false only for folders, so we default it to true here.  --> 
    45374510            <input type="hidden" value="true" name="calendarCollection"/> 
    4538             <!-- type is defaulted to calendar.  It is changed when a typeSwitch is clicked. --> 
    4539             <input type="hidden" value="calendar" name="type" id="bwCalType"/> 
    4540             <!-- input type="radio" value="calendar" name="typeSwitch" checked="checked" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Calendar--> 
    4541             <input type="radio" value="folder" name="typeSwitch" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Folder 
    4542             <input type="radio" value="subscription" name="typeSwitch" onclick="changeClass('subscriptionTypes','visible');setField('bwCalType',this.value);"/> Subscription 
     4511            <input type="hidden" value="subscription" name="type"/> 
     4512            <input type="hidden" name="aliasUri" value=""/> 
     4513            <!-- subType is defaulted to public.  It is changed when a subTypeSwitch is clicked. --> 
     4514            <input type="hidden" value="public" name="subType" id="bwSubType"/> 
     4515            <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');setField('bwSubType',this.value);"/> Public alias 
     4516            <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');setField('bwSubType',this.value);"/> URL 
     4517 
     4518              <div id="subscriptionTypePublic"> 
     4519                <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
     4520                <div id="bwPublicCalDisplay"> 
     4521                  Select the public calendar or folder: 
     4522                </div> 
     4523                <ul id="publicSubscriptionTree" class="calendarTree"> 
     4524                  <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
     4525                </ul> 
     4526              </div> 
     4527 
     4528              <div class="invisible" id="subscriptionTypeExternal"> 
     4529                <table class="common"> 
     4530                  <tr> 
     4531                    <th>URL to calendar:</th> 
     4532                    <td> 
     4533                      <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
     4534                    </td> 
     4535                  </tr> 
     4536                  <tr> 
     4537                    <th>ID (if required):</th> 
     4538                    <td> 
     4539                      <input type="text" name="remoteId" value="" size="40"/> 
     4540                    </td> 
     4541                  </tr> 
     4542                  <tr> 
     4543                    <th>Password (if required):</th> 
     4544                    <td> 
     4545                      <input type="password" name="remotePw" value="" size="40"/> 
     4546                    </td> 
     4547                  </tr> 
     4548                </table> 
     4549              </div> 
     4550 
    45434551          </td> 
    45444552        </tr> 
     
    45484556        <input type="submit" name="cancelled" value="cancel"/> 
    45494557      </div> 
    4550       <div id="subscriptionTypes" class="invisible"> 
    4551         <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based 
    4552              on the subscription type. --> 
    4553         <input type="hidden" name="aliasUri" value=""/> 
    4554         <p> 
    4555           <strong>Subscription Type:</strong><br/> 
    4556           <!-- subType is defaulted to public.  It is changed when a subTypeSwitch is clicked. --> 
    4557           <input type="hidden" value="public" name="subType" id="bwSubType"/> 
    4558           <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> Public calendar (alias) 
    4559           <!-- input type="radio" name="subTypeSwitch" value="user" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','visible');setField('bwSubType',this.value);"/> User calendar--> 
    4560           <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> URL 
    4561         </p> 
    4562  
    4563         <div id="subscriptionTypePublic"> 
    4564           <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
    4565           <div id="bwPublicCalDisplay"> 
    4566             Select the public calendar or folder: 
    4567           </div> 
    4568           <ul id="publicSubscriptionTree"> 
    4569             <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
    4570           </ul> 
    4571         </div> 
    4572  
    4573         <div id="subscriptionTypeUser" class="invisible"> 
    4574           <table class="common"> 
    4575             <tr> 
    4576               <th>User's ID:</th> 
    4577               <td> 
    4578                 <input type="text" name="userIdHolder" value="" size="40"/> 
    4579               </td> 
    4580             </tr> 
    4581             <tr> 
    4582               <th>Calendar Path:</th> 
    4583               <td> 
    4584                 <input type="text" name="userCalHolder" value="calendar" size="40"/><br/> 
    4585                 <span class="note">E.g. "calendar" (default) or "someFolder/someCalendar"</span> 
    4586               </td> 
    4587             </tr> 
    4588           </table> 
    4589         </div> 
    4590  
    4591  
    4592         <div class="invisible" id="subscriptionTypeExternal"> 
    4593           <table class="common"> 
    4594             <tr> 
    4595               <th>URL to calendar:</th> 
    4596               <td> 
    4597                 <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
    4598               </td> 
    4599             </tr> 
    4600             <tr> 
    4601               <th>ID (if required):</th> 
    4602               <td> 
    4603                 <input type="text" name="remoteId" value="" size="40"/> 
    4604               </td> 
    4605             </tr> 
    4606             <tr> 
    4607               <th>Password (if required):</th> 
    4608               <td> 
    4609                 <input type="password" name="remotePw" value="" size="40"/> 
    4610               </td> 
    4611             </tr> 
    4612           </table> 
    4613         </div> 
    4614       </div> 
    4615  
    46164558    </form> 
    46174559 
     
    46224564  </xsl:template> 
    46234565 
     4566  <xsl:template match="calendar" mode="selectCalForPublicAliasCalTree"> 
     4567    <xsl:variable name="id" select="id"/> 
     4568    <li> 
     4569      <xsl:attribute name="class"> 
     4570        <xsl:choose> 
     4571          <xsl:when test="name='Trash'">trash</xsl:when> 
     4572          <xsl:when test="isSubscription = 'true'">alias</xsl:when> 
     4573          <xsl:when test="calType = '0'">folder</xsl:when> 
     4574          <xsl:otherwise>calendar</xsl:otherwise> 
     4575        </xsl:choose> 
     4576      </xsl:attribute> 
     4577      <xsl:variable name="calPath" select="path"/> 
     4578      <xsl:variable name="calDisplay" select="path"/> 
     4579      <xsl:variable name="calendarCollection" select="calendarCollection"/> 
     4580      <xsl:choose> 
     4581        <xsl:when test="canAlias = 'true'"> 
     4582          <a href="javascript:updatePublicCalendarAlias('{$calPath}','{$calDisplay}','{$calendarCollection}')"> 
     4583            <xsl:value-of select="name"/> 
     4584          </a> 
     4585        </xsl:when> 
     4586        <xsl:otherwise> 
     4587          <xsl:value-of select="name"/> 
     4588        </xsl:otherwise> 
     4589      </xsl:choose> 
     4590      <xsl:if test="calendar"> 
     4591        <ul> 
     4592          <xsl:apply-templates select="calendar" mode="selectCalForPublicAliasCalTree"/> 
     4593        </ul> 
     4594      </xsl:if> 
     4595    </li> 
     4596  </xsl:template> 
     4597 
    46244598  <!--+++++++++++++++ Views ++++++++++++++++++++--> 
    46254599  <xsl:template match="views" mode="viewList"> 
     
    46274601    <xsl:variable name="userPath">/user/<xsl:value-of select="/bedework/userInfo/user"/>/</xsl:variable> 
    46284602 
    4629     <h3>Add a new view</h3> 
     4603    <h2>Manage Views</h2> 
     4604    <p> 
     4605      Views are named aggregations of subscriptions used 
     4606      to display sets of events within a calendar suite. 
     4607    </p> 
     4608 
     4609    <h4>Add a new view</h4> 
    46304610    <form name="addView" action="{$view-addView}" method="post"> 
    46314611      <input type="text" name="name" size="60"/> 
     
    46334613    </form> 
    46344614 
    4635     <h3>Views</h3
    4636     <table id="commonListTable"
     4615    <h4>Views</h4
     4616    <table id="commonListTable" class="viewsTable"
    46374617      <tr> 
    46384618        <th>Name</th> 
     
    47254705      </tr> 
    47264706    </table> 
     4707 
    47274708    <table border="0" id="submitTable"> 
    47284709      <tr> 
     
    56545635        <th>Name</th> 
    56555636        <th>Description</th> 
     5637        <th>Calendar Suite*</th> 
    56565638        <xsl:if test="/bedework/groups/showMembers='true'"> 
    56575639          <th>Members</th> 
     
    56605642      </tr> 
    56615643      <xsl:for-each select="/bedework/groups/group"> 
    5662         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--
     5644        <xsl:sort select="name" order="ascending" case-order="lower-first"/
    56635645        <xsl:variable name="groupName" select="name"/> 
    56645646        <tr> 
     5647          <xsl:if test="name = /bedework/calSuites//calSuite/group"> 
     5648            <xsl:attribute name="class">highlight</xsl:attribute> 
     5649          </xsl:if> 
    56655650          <td> 
    56665651            <a href="{$admingroup-fetchForUpdate}&amp;adminGroupName={$groupName}"> 
     
    56705655          <td> 
    56715656            <xsl:value-of select="desc"/> 
     5657          </td> 
     5658          <td> 
     5659            <xsl:for-each select="/bedework/calSuites/calSuite"> 
     5660              <xsl:if test="group = $groupName"> 
     5661                <xsl:value-of select="name"/> 
     5662              </xsl:if> 
     5663            </xsl:for-each> 
    56725664          </td> 
    56735665          <xsl:if test="/bedework/groups/showMembers='true'"> 
     
    56845676      </xsl:for-each> 
    56855677    </table> 
     5678    <p class="note"> 
     5679     *Highlighted rows indicate a group to which a Calendar Suite is attached. 
     5680    </p> 
    56865681    <p> 
    56875682      <input type="button" name="return" onclick="javascript:location.replace('{$admingroup-initAdd}')" value="Add a new group"/> 
  • trunk/deployment/webadmin/webapp/resources/resources/bedework.js

    r1781 r2001  
     1/* ********************************************************************** 
     2    Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
     3 
     4    Redistribution and use of this distribution in source and binary forms, 
     5    with or without modification, are permitted provided that: 
     6       The above copyright notice and this permission notice appear in all 
     7        copies and supporting documentation; 
     8 
     9        The name, identifiers, and trademarks of Rensselaer Polytechnic 
     10        Institute are not used in advertising or publicity without the 
     11        express prior written permission of Rensselaer Polytechnic Institute; 
     12 
     13    DISCLAIMER: The software is distributed" AS IS" without any express or 
     14    implied warranty, including but not limited to, any implied warranties 
     15    of merchantability or fitness for a particular purpose or any warrant)' 
     16    of non-infringement of any current or pending patent rights. The authors 
     17    of the software make no representations about the suitability of this 
     18    software for any particular purpose. The entire risk as to the quality 
     19    and performance of the software is with the user. Should the software 
     20    prove defective, the user assumes the cost of all necessary servicing, 
     21    repair or correction. In particular, neither Rensselaer Polytechnic 
     22    Institute, nor the authors of the software are liable for any indirect, 
     23    special, consequential, or incidental damages related to the software, 
     24    to the maximum extent the law permits. */ 
     25 
     26/* NOTE: this file is different between Bedework web applications and is 
     27   therefore not currently interchangable between apps.  This will be normalized 
     28   in the coming versions, but for now don't try to exchange them. */ 
     29 
    130var debug = false; // very basic debugging for now 
    231 
     
    433 
    534function changeClass(id, newClass) { 
    6   identity = document.getElementById(id); 
     35  var identity = document.getElementById(id); 
     36  if (identity == null) { 
     37    alert("No element with id: " + id + " to set to class: " + newClass); 
     38  } 
    739  identity.className=newClass; 
    840} 
     41// set a field's value by ID 
     42// typically used to set the value of a hidden field 
     43function setField(id,val) { 
     44  field = document.getElementById(id); 
     45  field.value = val; 
     46} 
     47 
     48// show hide items using a checkbox 
     49function swapVisible(obj,id) { 
     50  if (obj.checked) { 
     51    changeClass(id,'visible'); 
     52  } else { 
     53    changeClass(id,'invisible'); 
     54  } 
     55} 
     56// hide a group of items 
     57// send IDs as parameters 
     58function hide() { 
     59  if (arguments.length != 0) { 
     60    for (i = 0; i < arguments.length; i++) { 
     61      changeClass(arguments[i],'invisible'); 
     62    } 
     63  } 
     64} 
     65// show a group of items 
     66// send IDs as parameters 
     67function show() { 
     68  if (arguments.length != 0) { 
     69    for (i = 0; i < arguments.length; i++) { 
     70      changeClass(arguments[i],'visible'); 
     71    } 
     72  } 
     73} 
     74// show and hide an item based on its current 
     75// visibility; if visible, hide it; if invisible 
     76// show it. 
    977function toggleVisibility(id,newClass) { 
    1078  if (document.getElementById(id).className == 'invisible') { 
     
    1684  } else { 
    1785    changeClass(id,'invisible'); 
    18   } 
    19 } 
    20 // show hide items using a checkbox 
    21 function swapVisible(obj,id) { 
    22   if (obj.checked) { 
    23     changeClass(id,'visible'); 
    24   } else { 
    25     changeClass(id,'invisible'); 
    26   } 
    27 } 
    28 // hide a group of items 
    29 // send IDs as parameters 
    30 function hide() { 
    31   if (arguments.length != 0) { 
    32     for (i = 0; i < arguments.length; i++) { 
    33       changeClass(arguments[i],'invisible'); 
    34     } 
    35   } 
    36 } 
    37 // show a group of items 
    38 // send IDs as parameters 
    39 function show() { 
    40   if (arguments.length != 0) { 
    41     for (i = 0; i < arguments.length; i++) { 
    42       changeClass(arguments[i],'visible'); 
    43     } 
    4486  } 
    4587} 
     
    106148// editing, and importing events 
    107149function launchCalSelectWindow(URL) { 
    108   calSelect = window.open(URL, "calSelect", "width=700,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no"); 
     150  calSelect = window.open(URL, "calSelect", "width=500,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no"); 
    109151  window.calSelect.focus(); 
    110152} 
     
    122164  window.close(); 
    123165} 
     166// used to update a calendar subscription (alias) We must do two things: update the hidden 
     167// calendar input field and update the displayed text 
     168function updatePublicCalendarAlias(newCalPath,calDisplay,calendarCollection) { 
     169  var calendarAliasHolder = document.getElementById("publicAliasHolder"); 
     170  calendarAliasHolder.value = newCalPath; 
     171  var bwCalDisplay = document.getElementById("bwPublicCalDisplay"); 
     172  bwCalDisplay.innerHTML = "Selected calendar: <strong>" + calDisplay + "</strong>"; 
     173} 
     174// set the subscription URI when creating or updating a subscription 
     175function setCalendarAlias(formObj) { 
     176  if (!formObj) { 
     177    alert("The subscription form is not available."); 
     178    return false; 
     179  } 
     180 
     181  // set the aliasUri to an empty string.  Only set it if user 
     182  // has requested a subscription. 
     183  formObj.aliasUri.value == ""; 
     184 
     185  if (formObj.type.value == "folder") { 
     186    formObj.calendarCollection.value = "false"; 
     187  } else if (formObj.type.value == "subscription") { 
     188    switch (formObj.subType.value) { 
     189      case "public": 
     190        formObj.aliasUri.value = "bwcal://" + formObj.publicAliasHolder.value; 
     191        break; 
     192      case "user": 
     193        //the "/user/" string is temporary; it needs to be passed as a param. 
     194        formObj.aliasUri.value = "bwcal:///user/" + formObj.userIdHolder.value + "/" + formObj.userCalHolder.value; 
     195        break; 
     196      case "external": 
     197        formObj.aliasUri.value = formObj.aliasUriHolder.value; 
     198        break; 
     199    } 
     200  } 
     201  return true; 
     202} 
    124203// build a uri based on user and path in the subscription form 
     204// DEPRECATED - use setCalendarAlias() above. 
    125205function setSubscriptionUri(formObj,prefix) { 
    126206  if (formObj) { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1999 r2001  
    616616    <h3>options</h3> 
    617617    <ul id="sideBarMenu"> 
    618       <li> 
    619         <a href="{$category-initUpdate}">Manage Categories</a> 
    620       </li> 
    621       <li> 
    622         <a href="{$location-initUpdate}">Manage Locations</a> 
    623       </li> 
    624618      <li class="prefs"> 
    625619        <a href="{$prefs-fetchForUpdate}"> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js

    r1981 r2001  
    11/* ********************************************************************** 
    2     Copyright 2007 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
     2    Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
    33 
    44    Redistribution and use of this distribution in source and binary forms, 
     
    2424    to the maximum extent the law permits. */ 
    2525 
     26/* NOTE: this file is different between Bedework web applications and is  
     27   therefore not currently interchangable between apps.  This will be normalized 
     28   in the coming versions, but for now don't try to exchange them. */ 
     29 
    2630var debug = false; // very basic debugging for now 
    2731 
     
    7175// visibility; if visible, hide it; if invisible 
    7276// show it. 
    73 function toggleVisibility(id,cl) { 
    74   if(document.getElementById(id).className == 'invisible') { 
    75     changeClass(id,cl); 
     77function toggleVisibility(id,newClass) { 
     78  if (document.getElementById(id).className == 'invisible') { 
     79    if (newClass != "") { 
     80      changeClass(id,newClass); 
     81    } else { 
     82      changeClass(id,'visible'); 
     83    } 
    7684  } else { 
    7785    changeClass(id,'invisible'); 
     
    158166// launch the calSelect pop-up window for selecting a calendar when creating, 
    159167// editing, and importing events 
    160 // DEPRECATED - can't use pop-ups in current portal environments in a 
    161 // portal-agnostic way 
    162168function launchCalSelectWindow(URL) { 
    163169  calSelect = window.open(URL, "calSelect", "width=500,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no");