Changeset 1913
- Timestamp:
- 08/07/08 21:38:49
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1912 r1913 4987 4987 <h3>Add a public subscription</h3> 4988 4988 <p class="note">*the subsciption name must be unique</p> 4989 <form name="subscribeForm" action="{$calendar-update}" onsubmit="return set SubscriptionUri(this,'bwcal://')" method="post">4989 <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setBwSubscriptionUri(this, true)" method="post"> 4990 4990 <table class="common" cellspacing="0"> 4991 4991 <tr> … … 5083 5083 <div id="content"> 5084 5084 <p class="note">*the subsciption name must be unique</p> 5085 <form name="subscribeForm" action="{$calendar-update}" onsubmit="return set SubscriptionUri(this,'bwcal:///user/')" method="post">5085 <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setBwSubscriptionUri(this, false)" method="post"> 5086 5086 <table class="common" cellspacing="0"> 5087 5087 <tr> trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js
r1911 r1913 178 178 } 179 179 // build a uri based on user and path in the subscription form 180 function setSubscriptionUri(formObj,prefix) { 181 if (formObj) { 182 var fullUri = prefix + formObj.userId.value; 183 if (formObj.userPath.value != "") { 184 if (formObj.userPath.value.substring(0,1) == "/") { 185 fullUri += formObj.userPath.value; 186 } else { 187 fullUri += "/" + formObj.userPath.value; 188 } 189 } 190 formObj.aliasUri.value = fullUri; 191 return true; 192 } else { 180 function setBwSubscriptionUri(formObj, publicUri) { 181 if (!formObj) { 193 182 alert("The subscription form is not available."); 194 183 return false; 195 184 } 185 186 var fullUri = "bwcal://"; 187 188 if (publicUri) { 189 fullUri += formObj.aliasUri.value; 190 } else { 191 fullUri += "/user" + formObj.userId.value; 192 if (formObj.userPath.value != "") { 193 if (formObj.userPath.value.substring(0,1) != "/") { 194 fullUri += "/"; 195 } 196 197 fullUri += formObj.userPath.value; 198 } 199 } 200 201 formObj.aliasUri.value = fullUri; 202 return true; 196 203 } 197 204 function exportCalendar(formId,name,calPath) {
