Changeset 2001
- Timestamp:
- 12/31/08 14:58:23
- Files:
-
- trunk/deployment/webadmin/webapp/resources/default/default/default.css (modified) (10 diffs)
- trunk/deployment/webadmin/webapp/resources/default/default/default.xsl (modified) (22 diffs)
- trunk/deployment/webadmin/webapp/resources/resources/bedework.js (modified) (5 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/default.css
r1999 r2001 298 298 padding: 0.25em 0 0 0; 299 299 } 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 }312 300 #bwSubmittedEventCommentBlock { 313 301 font-size: 0.9em; … … 349 337 #commonListTable th { 350 338 padding: 0.2em 1em 0.2em 0.5em; 351 background-color : # ccc;339 background-color : #bbb; 352 340 color: black; 353 341 white-space: nowrap; … … 358 346 padding: 0.2em 1em 0.2em 0.5em; 359 347 color: black; 360 background-color: # eee;348 background-color: #ddd; 361 349 } 362 350 #commonListTable td.date, … … 365 353 } 366 354 #commonListTable tr.highlight td { 367 background-color: #ffd; 355 background-color: #eee; 356 color: black; 368 357 } 369 358 .recurrenceEditLinks { … … 726 715 } 727 716 #sharingBox { 728 margin: 0;717 margin: 1em 0; 729 718 border-top: 1px solid #333; 730 719 padding: 1em 1em 2em 1em; … … 932 921 padding: 2em; 933 922 } 934 #calendarTree ul {923 .calendarTree ul { 935 924 padding-left: 10px; 936 925 margin-left: 10px; 937 926 } 938 #calendarTree li {927 .calendarTree li { 939 928 padding-top: 0.25em; 940 929 /*font-weight: bold;*/ 941 930 } 942 #calendarTreeli.folder {931 li.folder { 943 932 list-style-image: url(../../resources/catIcon.gif); 944 933 } 945 #calendarTreeli.calendar {934 li.calendar { 946 935 list-style-image: url(../../resources/calIcon-sm.gif); 947 936 } 948 #calendarTree li.trash {937 .calendarTree li.trash { 949 938 list-style-image: url(../../resources/trashIcon.gif); 950 939 } 951 #calendarTree li.inbox {940 .calendarTree li.inbox { 952 941 list-style-image: url(../../resources/inboxIcon.gif); 953 942 } 954 #calendarTree li.outbox {943 .calendarTree li.outbox { 955 944 list-style-image: url(../../resources/outboxIcon.gif); 956 945 } 957 #calendarTree li.deleted {946 .calendarTree li.deleted { 958 947 list-style-image: url(../../resources/calIconDeleted-sm.gif); 959 948 } 960 #calendarTree li.selected {949 .calendarTree li.selected { 961 950 list-style-image: url(../../resources/glassFill-icon-view.gif); 962 951 font-weight: bold; 963 952 } 964 #calendarTree li.alias {953 .calendarTree li.alias { 965 954 list-style-image: url(../../resources/calIconAlias-sm.gif); 966 955 font-style: italic; … … 968 957 padding-left: 0; 969 958 } 970 #calendarTree li.aliasFolder {959 .calendarTree li.aliasFolder { 971 960 list-style-image: url(../../resources/catIconAlias.gif); 972 961 font-style: italic; … … 974 963 padding-left: 0; 975 964 } 976 #calendarTree li.subscription li {965 .calendarTree li.subscription li { 977 966 font-style: normal; 978 967 } 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 { 989 969 /* the arrangement below is required for cross-browser compatibility; 990 970 be cautious changing it (works IE7, FF2, Safari 3) */ … … 993 973 margin: 0 25px 0 -35px; 994 974 } 975 #bwPublicCalDisplay { 976 margin: 1em 0 -1em 1em; 977 } 995 978 #filterTable { 996 979 font-size: 0.9em; … … 1053 1036 .padTop { 1054 1037 padding-top: 1em; 1038 } 1039 .viewsTable { 1040 width: 60%; 1041 } 1042 a { 1043 color: #00c; 1044 background-color: inherit; 1045 text-decoration: none; 1046 } 1047 a:hover { 1048 color: #483D8B; 1049 background-color: #ff3; 1055 1050 } 1056 1051 #footer { trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r1999 r2001 275 275 </script> 276 276 </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'"> 278 280 <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js"> </script> 279 281 <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js"> </script> … … 3211 3213 <td class="cals"> 3212 3214 <h3>Public calendars</h3> 3213 <ul id="calendarTree">3215 <ul class="calendarTree"> 3214 3216 <xsl:choose> 3215 3217 <xsl:when test="/bedework/page='calendarDescriptions' or /bedework/page='displayCalendar'"> … … 3437 3439 </div> 3438 3440 <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"> 3482 3444 <tr> 3483 3445 <th>URL to calendar:</th> 3484 3446 <td> 3485 <input type="text" name="aliasUri Holder" id="aliasUriHolder" value="" size="40"/>3447 <input type="text" name="aliasUri" value="" size="40"/> 3486 3448 </td> 3487 3449 </tr> … … 3499 3461 </tr> 3500 3462 </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> 3501 3467 </div> 3502 3468 </div> … … 3638 3604 <xsl:choose> 3639 3605 <xsl:when test="isSubscription='true'"> 3640 <input type="submit" name="delete" value=" Delete Subscription"/>3606 <input type="submit" name="delete" value="Remove Subscription"/> 3641 3607 </xsl:when> 3642 3608 <xsl:when test="calType = '0'"> … … 3729 3695 <xsl:template match="currentCalendar" mode="deleteCalendarConfirm"> 3730 3696 <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> 3731 3704 <xsl:when test="calType = '0'"> 3732 3705 <h3>Delete Folder</h3> … … 3779 3752 <td align="right"> 3780 3753 <xsl:choose> 3754 <xsl:when test="isSubscription = 'true'"> 3755 <input type="submit" name="delete" value="Yes: Remove Subscription!"/> 3756 </xsl:when> 3781 3757 <xsl:when test="calType = '0'"> 3782 3758 <input type="submit" name="delete" value="Yes: Delete Folder!"/> … … 3813 3789 </form>--> 3814 3790 <h4>Calendars</h4> 3815 <ul id="calendarTree">3791 <ul class="calendarTree"> 3816 3792 <xsl:apply-templates select="/bedework/calendars/calendar" mode="selectCalForEventCalTree"/> 3817 3793 </ul> … … 3906 3882 <td class="bwCalsForMove"> 3907 3883 <p>Select a new parent folder:</p> 3908 <ul id="calendarTree">3884 <ul class="calendarTree"> 3909 3885 <xsl:apply-templates select="/bedework/calendars/calendar" mode="listForMove"/> 3910 3886 </ul> … … 4387 4363 <td class="cals"> 4388 4364 <h3>Subscription Tree</h3> 4389 <ul id="calendarTree">4365 <ul class="calendarTree"> 4390 4366 <xsl:apply-templates select="calendar" mode="listForUpdateSubscription"> 4391 4367 <xsl:with-param name="root">true</xsl:with-param> … … 4471 4447 <xsl:if test="calendar"> 4472 4448 <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"/> 4475 4450 </ul> 4476 4451 </xsl:if> … … 4479 4454 4480 4455 <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)"> 4483 4458 <table class="common"> 4484 4459 <tr> … … 4533 4508 <th>Type:</th> 4534 4509 <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. -->4537 4510 <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 4543 4551 </td> 4544 4552 </tr> … … 4548 4556 <input type="submit" name="cancelled" value="cancel"/> 4549 4557 </div> 4550 <div id="subscriptionTypes" class="invisible">4551 <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based4552 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);"/> URL4561 </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 4616 4558 </form> 4617 4559 … … 4622 4564 </xsl:template> 4623 4565 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 4624 4598 <!--+++++++++++++++ Views ++++++++++++++++++++--> 4625 4599 <xsl:template match="views" mode="viewList"> … … 4627 4601 <xsl:variable name="userPath">/user/<xsl:value-of select="/bedework/userInfo/user"/>/</xsl:variable> 4628 4602 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> 4630 4610 <form name="addView" action="{$view-addView}" method="post"> 4631 4611 <input type="text" name="name" size="60"/> … … 4633 4613 </form> 4634 4614 4635 <h 3>Views</h3>4636 <table id="commonListTable" >4615 <h4>Views</h4> 4616 <table id="commonListTable" class="viewsTable"> 4637 4617 <tr> 4638 4618 <th>Name</th> … … 4725 4705 </tr> 4726 4706 </table> 4707 4727 4708 <table border="0" id="submitTable"> 4728 4709 <tr> … … 5654 5635 <th>Name</th> 5655 5636 <th>Description</th> 5637 <th>Calendar Suite*</th> 5656 5638 <xsl:if test="/bedework/groups/showMembers='true'"> 5657 5639 <th>Members</th> … … 5660 5642 </tr> 5661 5643 <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"/> 5663 5645 <xsl:variable name="groupName" select="name"/> 5664 5646 <tr> 5647 <xsl:if test="name = /bedework/calSuites//calSuite/group"> 5648 <xsl:attribute name="class">highlight</xsl:attribute> 5649 </xsl:if> 5665 5650 <td> 5666 5651 <a href="{$admingroup-fetchForUpdate}&adminGroupName={$groupName}"> … … 5670 5655 <td> 5671 5656 <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> 5672 5664 </td> 5673 5665 <xsl:if test="/bedework/groups/showMembers='true'"> … … 5684 5676 </xsl:for-each> 5685 5677 </table> 5678 <p class="note"> 5679 *Highlighted rows indicate a group to which a Calendar Suite is attached. 5680 </p> 5686 5681 <p> 5687 5682 <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 1 30 var debug = false; // very basic debugging for now 2 31 … … 4 33 5 34 function 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 } 7 39 identity.className=newClass; 8 40 } 41 // set a field's value by ID 42 // typically used to set the value of a hidden field 43 function setField(id,val) { 44 field = document.getElementById(id); 45 field.value = val; 46 } 47 48 // show hide items using a checkbox 49 function 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 58 function 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 67 function 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. 9 77 function toggleVisibility(id,newClass) { 10 78 if (document.getElementById(id).className == 'invisible') { … … 16 84 } else { 17 85 changeClass(id,'invisible'); 18 }19 }20 // show hide items using a checkbox21 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 items29 // send IDs as parameters30 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 items38 // send IDs as parameters39 function show() {40 if (arguments.length != 0) {41 for (i = 0; i < arguments.length; i++) {42 changeClass(arguments[i],'visible');43 }44 86 } 45 87 } … … 106 148 // editing, and importing events 107 149 function 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"); 109 151 window.calSelect.focus(); 110 152 } … … 122 164 window.close(); 123 165 } 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 168 function 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 175 function 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 } 124 203 // build a uri based on user and path in the subscription form 204 // DEPRECATED - use setCalendarAlias() above. 125 205 function setSubscriptionUri(formObj,prefix) { 126 206 if (formObj) { trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1999 r2001 616 616 <h3>options</h3> 617 617 <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>624 618 <li class="prefs"> 625 619 <a href="{$prefs-fetchForUpdate}"> trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js
r1981 r2001 1 1 /* ********************************************************************** 2 Copyright 200 7Rensselaer Polytechnic Institute. All worldwide rights reserved.2 Copyright 2008 Rensselaer Polytechnic Institute. All worldwide rights reserved. 3 3 4 4 Redistribution and use of this distribution in source and binary forms, … … 24 24 to the maximum extent the law permits. */ 25 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 26 30 var debug = false; // very basic debugging for now 27 31 … … 71 75 // visibility; if visible, hide it; if invisible 72 76 // show it. 73 function toggleVisibility(id,cl) { 74 if(document.getElementById(id).className == 'invisible') { 75 changeClass(id,cl); 77 function toggleVisibility(id,newClass) { 78 if (document.getElementById(id).className == 'invisible') { 79 if (newClass != "") { 80 changeClass(id,newClass); 81 } else { 82 changeClass(id,'visible'); 83 } 76 84 } else { 77 85 changeClass(id,'invisible'); … … 158 166 // launch the calSelect pop-up window for selecting a calendar when creating, 159 167 // editing, and importing events 160 // DEPRECATED - can't use pop-ups in current portal environments in a161 // portal-agnostic way162 168 function launchCalSelectWindow(URL) { 163 169 calSelect = window.open(URL, "calSelect", "width=500,height=600,scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,toolbar=no");
