Changeset 1913

Show
Ignore:
Timestamp:
08/07/08 21:38:49
Author:
douglm
Message:

More subscribe fixes

Files:

Legend:

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

    r1912 r1913  
    49874987      <h3>Add a public subscription</h3> 
    49884988      <p class="note">*the subsciption name must be unique</p> 
    4989       <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setSubscriptionUri(this,'bwcal://')" method="post"> 
     4989      <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setBwSubscriptionUri(this, true)" method="post"> 
    49904990        <table class="common" cellspacing="0"> 
    49914991          <tr> 
     
    50835083    <div id="content"> 
    50845084      <p class="note">*the subsciption name must be unique</p> 
    5085       <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setSubscriptionUri(this,'bwcal:///user/')" method="post"> 
     5085      <form name="subscribeForm" action="{$calendar-update}" onsubmit="return setBwSubscriptionUri(this, false)" method="post"> 
    50865086        <table class="common" cellspacing="0"> 
    50875087          <tr> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedework.js

    r1911 r1913  
    178178} 
    179179// 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 { 
     180function setBwSubscriptionUri(formObj, publicUri) { 
     181  if (!formObj) { 
    193182    alert("The subscription form is not available."); 
    194183    return false; 
    195184  } 
     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; 
    196203} 
    197204function exportCalendar(formId,name,calPath) {