Changeset 481
- Timestamp:
- 05/15/06 16:46:57
- Files:
-
- trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl (modified) (8 diffs)
- trunk/calendar3/deployment/webuser/webapp/resources/demoskins/resources/includes.js (modified) (2 diffs)
- trunk/calendar3/webclient/war/WEB-INF/struts-config.xml (modified) (2 diffs)
- trunk/calendar3/webclient/war/docs/header.jsp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r479 r481 76 76 <xsl:variable name="subscriptions-fetch" select="/bedework/urlPrefixes/subscriptions/fetch/a/@href"/> 77 77 <xsl:variable name="subscriptions-fetchForUpdate" select="/bedework/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/> 78 <xsl:variable name="subscriptions-addSubByUri" select="/bedework/urlPrefixes/subscriptions/addSubByUri/a/@href"/> 79 <xsl:variable name="subscriptions-subscribeByUri" select="/bedework/urlPrefixes/subscriptions/subscribeByUri/a/@href"/> 78 80 <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 79 81 <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> … … 160 162 <xsl:apply-templates select="/bedework/formElements" mode="editLocation"/> 161 163 </xsl:when> 162 <xsl:when test="/bedework/page='subscriptions' or /bedework/page='modSubscription'"> 164 <xsl:when test="/bedework/page='subscriptions' or 165 /bedework/page='modSubscription' or 166 /bedework/page='addSubByUri'"> 163 167 <xsl:apply-templates select="/bedework/subscriptions"/> 164 168 </xsl:when> … … 241 245 /bedework/page='selectCalForEvent' or 242 246 /bedework/page='upload' or 247 /bedework/page='addSubByUri' or 243 248 /bedework/page='modPrefs'"> 244 249 <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> … … 723 728 </td> 724 729 </xsl:when> 725 <xsl:when test="start/shortdate = end/shortdate and 730 <xsl:when test="start/shortdate = end/shortdate and 726 731 start/time = end/time"> 727 732 <td class="{$dateRangeStyle} center" colspan="3"> 728 733 <a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> 729 <xsl:value-of select="start/time"/> 734 <xsl:value-of select="start/time"/> 730 735 </a> 731 736 </td> … … 2878 2883 <xsl:call-template name="subscriptionList"/> 2879 2884 </xsl:when> 2885 <xsl:when test="/bedework/page='addSubByUri'"> 2886 <xsl:call-template name="addSubByUri"/> 2887 </xsl:when> 2880 2888 <xsl:when test="/bedework/creating='true'"> 2881 <xsl:apply-templates select="subscription" mode="addS ubscription"/>2889 <xsl:apply-templates select="subscription" mode="addSystemSubscription"/> 2882 2890 </xsl:when> 2883 2891 <xsl:otherwise> … … 2914 2922 </xsl:template> 2915 2923 2916 <xsl:template match="subscription" mode="addSubscription"> 2924 <!-- add a subscription to a user calendar by user and path; this is actually 2925 a subscription to an arbitrary URI (which we can expose later) --> 2926 <xsl:template name="addSubByUri"> 2927 <h3>Add Subscription to User Calendar</h3> 2928 <p class="note">*the subsciption name must be unique</p> 2929 <form name="subscribeForm" action="{$subscriptions-subscribe}" onsubmit="return setSubscriptionUri(this)" method="post"> 2930 <table class="common" cellspacing="0"> 2931 <tr> 2932 <td class="fieldname">Name:</td> 2933 <td> 2934 <input type="text" value="" name="subscription.name" size="60"/> 2935 </td> 2936 </tr> 2937 <!-- the following would be for an arbitrary URI. We'll add this later. 2938 <tr> 2939 <td class="fieldname">Uri:</td> 2940 <td> 2941 <input type="text" value="" name="subscription.uri" size="60"/> 2942 </td> 2943 </tr>--> 2944 <tr> 2945 <td class="fieldname">User ID:</td> 2946 <td> 2947 <input type="hidden" value="" name="subscription.uri"/> 2948 <input type="text" value="" name="userId" size="20"/> 2949 <span class="note">ex: douglm</span> 2950 </td> 2951 </tr> 2952 <tr> 2953 <td class="fieldname">User path:</td> 2954 <td> 2955 <input type="text" value="" name="userPath" size="20"/> 2956 <span class="note">(optional) ex: someDept/meetings</span> 2957 </td> 2958 </tr> 2959 <tr> 2960 <td class="fieldname">Display:</td> 2961 <td> 2962 <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 2963 <input type="radio" value="false" name="subscription.display"/> no 2964 </td> 2965 </tr> 2966 <tr> 2967 <td class="fieldname">Affects Free/Busy:</td> 2968 <td> 2969 <input type="radio" value="true" name="subscription.affectsFreeBusy"/> yes 2970 <input type="radio" value="false" name="subscription.affectsFreeBusy" checked="checked"/> no 2971 </td> 2972 </tr> 2973 <tr> 2974 <td class="fieldname">Style:</td> 2975 <td> 2976 <input type="text" value="" name="subscription.style" size="60"/> 2977 </td> 2978 </tr> 2979 <!--<tr> 2980 <td class="fieldname">Unremovable:</td> 2981 <td> 2982 <input type="radio" value="true" name="unremoveable" size="60"/> true 2983 <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 2984 </td> 2985 </tr>--> 2986 </table> 2987 <table border="0" id="submitTable"> 2988 <tr> 2989 <td> 2990 <input type="submit" name="addSubscription" value="Add Subscription"/> 2991 <input type="submit" name="cancelled" value="Cancel"/> 2992 <input type="reset" value="Clear"/> 2993 </td> 2994 </tr> 2995 </table> 2996 </form> 2997 </xsl:template> 2998 2999 <!-- add a subscription to a public calendar within the system --> 3000 <xsl:template match="subscription" mode="addSystemSubscription"> 2917 3001 <h3>Add New Subscription</h3> 2918 3002 <p class="note">*the subsciption name must be unique</p> … … 3131 3215 </xsl:for-each> 3132 3216 </table> 3133 <h4><a href="{$subscriptions- initAdd}">Subscribe to a calendar</a> (by URI)</h4>3217 <h4><a href="{$subscriptions-addSubByUri}">Subscribe to another user's calendar</a></h4> 3134 3218 </xsl:template> 3135 3219 … … 3414 3498 <xsl:call-template name="editLocationList"/> 3415 3499 </xsl:template> 3416 3500 3417 3501 <xsl:template name="editLocationList"> 3418 3502 <table class="common" cellspacing="0"> trunk/calendar3/deployment/webuser/webapp/resources/demoskins/resources/includes.js
r460 r481 100 100 } 101 101 102 // build the workdays parameter as a string when submitting user preferences form 102 103 function setWorkDays(formObj) { 103 104 if (formObj) { … … 115 116 } 116 117 } 118 119 // build a uri based on user and path in the subscription form 120 function setSubscriptionUri(formObj) { 121 if (formObj) { 122 var fullUri = "bwcal:///user/"; 123 fullUri += formObj.userId.value; 124 if (formObj.userPath.value != "") { 125 if (formObj.userPath.value.substring(0,1) == "/") { 126 fullUri += formObj.userPath.value; 127 } else { 128 fullUri += "/" + formObj.userPath.value; 129 } 130 } 131 formObj["subscription.uri"].value = fullUri; 132 alert(formObj["subscription.uri"].value); 133 return true; 134 } else { 135 alert("The subscription form is not available."); 136 return false; 137 } 138 } trunk/calendar3/webclient/war/WEB-INF/struts-config.xml
r479 r481 613 613 </action> 614 614 615 <!-- renderUrl --> 616 <action path="/subs/showAddByUriForm" 617 type="org.bedework.webclient.BwRenderAction" 618 name="calForm" 619 scope="session" 620 validate="false"> 621 <forward name="success" path="/docs/subs/addSubByUri.jsp"/> 622 </action> 623 615 624 <action path="/subs/initAdd" 616 625 type="org.bedework.webcommon.subs.InitSubscribeAction" … … 640 649 <forward name="retry" path="/subs/showModForm.rdo" redirect="true"/> 641 650 <forward name="reffed" path="/subs/showSubs.rdo" redirect="true"/> 651 <forward name="noAccess" path="/subs/showSubs.rdo" redirect="true"/> 652 <forward name="success" path="/subs/showSubs.rdo" redirect="true" /> 653 </action> 654 655 <action path="/subs/subscribeByUri" 656 type="org.bedework.webcommon.subs.SubscribeAction" 657 name="calForm" 658 scope="session" 659 validate="false"> 660 <forward name="cancelled" path="/subs/showSubs.rdo" redirect="true"/> 661 <forward name="retry" path="/subs/showAddByUriForm.rdo" redirect="true"/> 662 <forward name="reffed" path="/subs/showSubs.rdo" redirect="true"/> 663 <forward name="noAccess" path="/subs/showSubs.rdo" redirect="true"/> 642 664 <forward name="success" path="/subs/showSubs.rdo" redirect="true" /> 643 665 </action> trunk/calendar3/webclient/war/docs/header.jsp
r447 r481 163 163 <fetch><genurl:link page="/subs/fetch.do?b=de"/></fetch> 164 164 <fetchForUpdate><genurl:link page="/subs/fetchForUpdate.do?b=de"/></fetchForUpdate> 165 <addSubByUri><genurl:link page="/subs/showAddByUriForm.rdo?b=de"/></addSubByUri> 166 <subscribeByUri><genurl:link page="/subs/subscribeByUri.do?b=de"/></subscribeByUri> 165 167 <initAdd><genurl:link page="/subs/initAdd.do?b=de"/></initAdd> 166 168 <subscribe><genurl:link page="/subs/subscribe.do?b=de"/></subscribe>
