Changeset 104

Show
Ignore:
Timestamp:
02/07/06 12:06:47
Author:
johnsa
Message:

changed two actions in struts-config:

setView is now setViewPeriod
selectView is now setSelection
updated jsp and xsl to accomodate the changes
made first pass at getting calendar list into shape in public client

Files:

Legend:

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

    r103 r104  
    5151       urls; allows the application to be used without cookies or within a portal. --> 
    5252  <xsl:variable name="setup" select="/ucalendar/urlPrefixes/setup"/> 
    53   <xsl:variable name="selectView" select="/ucalendar/urlPrefixes/selectView"/> 
     53  <xsl:variable name="setSelection" select="/ucalendar/urlPrefixes/setSelection"/> 
    5454  <xsl:variable name="fetchPublicCalendars" select="/ucalendar/urlPrefixes/fetchPublicCalendars"/> 
    55   <xsl:variable name="setView" select="/ucalendar/urlPrefixes/setView"/> 
     55  <xsl:variable name="setViewPeriod" select="/ucalendar/urlPrefixes/setViewPeriod"/> 
    5656  <xsl:variable name="eventView" select="/ucalendar/urlPrefixes/eventView"/> 
    5757  <xsl:variable name="addEventRef" select="/ucalendar/urlPrefixes/addEventRef"/> 
     
    325325                <td colspan="5" class="dateRow"> 
    326326                   <xsl:variable name="date" select="date"/> 
    327                    <a href="{$setView}?viewType=dayView&amp;date={$date}"> 
     327                   <a href="{$setViewPeriod}?viewType=dayView&amp;date={$date}"> 
    328328                     <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    329329                   </a> 
     
    447447                    <img class="addref" src="{$resourcesRoot}/images/demo/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> 
    448448                  </a> 
    449                   <xsl:variable name="icalName" select="concat($id,'.ics')"/> 
    450                   <a href="{$eventView}?eventId=subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$icalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     449                  <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> 
     450                  <a href="{$export}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    451451                    <img src="{$resourcesRoot}/images/demo/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
    452452                  </a> 
     
    474474            <td> 
    475475              <xsl:variable name="dayDate" select="date"/> 
    476               <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink"> 
     476              <a href="{$setViewPeriod}?viewType=dayView&amp;date={$dayDate}" class="dayLink"> 
    477477                <xsl:value-of select="value"/> 
    478478              </a> 
     
    508508                <td> 
    509509                  <xsl:variable name="dayDate" select="date"/> 
    510                   <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink"> 
     510                  <a href="{$setViewPeriod}?viewType=dayView&amp;date={$dayDate}" class="dayLink"> 
    511511                    <xsl:value-of select="value"/> 
    512512                  </a> 
     
    592592          <td colspan="8" class="monthName"> 
    593593            <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
    594             <a href="{$setView}?viewType=monthView&amp;date={$firstDayOfMonth}"> 
     594            <a href="{$setViewPeriod}?viewType=monthView&amp;date={$firstDayOfMonth}"> 
    595595              <xsl:value-of select="longname"/> 
    596596            </a> 
     
    607607            <td class="weekCell"> 
    608608              <xsl:variable name="firstDayOfWeek" select="day/date"/> 
    609               <a href="{$setView}?viewType=weekView&amp;date={$firstDayOfWeek}"> 
     609              <a href="{$setViewPeriod}?viewType=weekView&amp;date={$firstDayOfWeek}"> 
    610610                <xsl:value-of select="value"/> 
    611611              </a> 
     
    619619                  <td> 
    620620                    <xsl:variable name="dayDate" select="date"/> 
    621                     <a href="{$setView}?viewType=dayView&amp;date={$dayDate}"> 
     621                    <a href="{$setViewPeriod}?viewType=dayView&amp;date={$dayDate}"> 
    622622                      <xsl:value-of select="value"/> 
    623623                    </a> 
     
    634634  <!--==== CALENDARS PAGE ====--> 
    635635  <xsl:template match="calendars"> 
    636     <xsl:variable name="topLevelCalCount" select="count(/ucalendar/calendars/calendar)"/> 
     636    <xsl:variable name="topLevelCalCount" select="count(/ucalendar/calendars/calendar/calendar)"/> 
    637637    <table id="calPageTable" border="0" cellpadding="0" cellspacing="0"> 
    638638      <tr> 
     
    648648      <tr> 
    649649        <td class="leftCell"> 
    650           <xsl:apply-templates select="calendar[position() &lt;= floor($topLevelCalCount div 2)]"/> 
     650          <xsl:apply-templates select="calendar/calendar[position() &lt;= floor($topLevelCalCount div 2)]"/> 
    651651        </td> 
    652652        <td> 
    653           <xsl:apply-templates select="calendar[position() &gt; floor($topLevelCalCount div 2)]"/> 
     653          <xsl:apply-templates select="calendar/calendar[position() &gt; floor($topLevelCalCount div 2)]"/> 
    654654        </td> 
    655655      </tr> 
     
    658658 
    659659  <xsl:template match="calendar"> 
    660     <xsl:variable name="id" select="id"/> 
    661     <h2><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></h2> 
     660    <xsl:variable name="url" select="url"/> 
     661    <h2><a href="{$setSelection}?calUrl={$url}"><xsl:value-of select="name"/></a></h2> 
    662662    <ul> 
    663663      <xsl:for-each select="calendar"> 
    664664        <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
    665         <xsl:variable name="id" select="id"/> 
    666         <li><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></li> 
     665        <xsl:variable name="url" select="url"/> 
     666        <li><a href="{$setSelection}?calUrl={$url}"><xsl:value-of select="name"/></a></li> 
    667667      </xsl:for-each> 
    668668    </ul> 
     
    754754            <img alt="print this view" src="{$resourcesRoot}/images/demo/std-print-icon.gif" width="20" height="14" border="0"/> 
    755755          </a> 
    756           <a class="rss" href="{$selectView}?calId=&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
     756          <a class="rss" href="{$setSelection}?calId=&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    757757          <xsl:variable name="calcategory"> 
    758758            <xsl:choose> 
     
    778778              <xsl:choose> 
    779779                <xsl:when test="/ucalendar/periodname='Day'"> 
    780                   <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     780                  <a href="{$setViewPeriod}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    781781                </xsl:when> 
    782782                <xsl:otherwise> 
    783                   <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     783                  <a href="{$setViewPeriod}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    784784                </xsl:otherwise> 
    785785              </xsl:choose> 
     
    788788              <xsl:choose> 
    789789                <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''"> 
    790                   <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     790                  <a href="{$setViewPeriod}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    791791                 </xsl:when> 
    792792                <xsl:otherwise> 
    793                   <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     793                  <a href="{$setViewPeriod}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    794794                 </xsl:otherwise> 
    795795              </xsl:choose> 
     
    798798              <xsl:choose> 
    799799                <xsl:when test="/ucalendar/periodname='Month'"> 
    800                   <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     800                  <a href="{$setViewPeriod}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    801801                </xsl:when> 
    802802                <xsl:otherwise> 
    803                   <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     803                  <a href="{$setViewPeriod}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    804804                </xsl:otherwise> 
    805805              </xsl:choose> 
     
    808808              <xsl:choose> 
    809809                <xsl:when test="/ucalendar/periodname='Year'"> 
    810                   <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     810                  <a href="{$setViewPeriod}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    811811                </xsl:when> 
    812812                <xsl:otherwise> 
    813                   <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     813                  <a href="{$setViewPeriod}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    814814                </xsl:otherwise> 
    815815              </xsl:choose> 
     
    898898          <tr> 
    899899            <td> 
    900               <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     900              <a href="{$setViewPeriod}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    901901            </td> 
    902902            <td> 
    903               <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     903              <a href="{$setViewPeriod}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    904904            </td> 
    905905            <td> 
    906               <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     906              <a href="{$setViewPeriod}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    907907            </td> 
    908908            <td> 
    909               <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     909              <a href="{$setViewPeriod}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    910910            </td> 
    911911            <td class="centerCell"> 
     
    935935      <tr> 
    936936        <td class="leftCell"> 
    937           <a href="{$setView}?date={$prevdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    938           <a href="{$setView}?date={$nextdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
     937          <a href="{$setViewPeriod}?date={$prevdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
     938          <a href="{$setViewPeriod}?date={$nextdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
    939939          <xsl:choose> 
    940940            <xsl:when test="/ucalendar/periodname='Day'"> 
     
    953953        </td> 
    954954        <td align="right" class="gotoForm"> 
    955           <form name="calForm" method="get" action="{$setView}"> 
     955          <form name="calForm" method="get" action="{$setViewPeriod}"> 
    956956             <table border="0" cellpadding="0" cellspacing="0"> 
    957957              <tr> 
     
    10121012        </td> 
    10131013        <td class="todayButton"> 
    1014           <a href="{$setView}?viewType=todayView&amp;date={$curdate}"> 
     1014          <a href="{$setViewPeriod}?viewType=todayView&amp;date={$curdate}"> 
    10151015            <img src="{$resourcesRoot}/images/demo/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    10161016          </a> 
     
    10291029             <xsl:when test="/ucalendar/name!=''"> 
    10301030               View: 
    1031                <form name="selectViewForm" method="get" action="{$selectView}"> 
     1031               <form name="selectViewForm" method="get" action="{$setSelection}"> 
    10321032                <select name="viewName" onChange="submit()" > 
    10331033                  <xsl:for-each select="/ucalendar/views/view"> 
     
    10441044                </select> 
    10451045              </form> 
    1046               <span class="calLinks"><a href="{$selectView}">default view</a> | <a href="{$fetchPublicCalendars}">calendar list</a></span> 
     1046              <span class="calLinks"><a href="{$setSelection}">default view</a> | <a href="{$fetchPublicCalendars}">calendar list</a></span> 
    10471047             </xsl:when> 
    10481048             <xsl:when test="/ucalendar/search!=''"> 
    10491049               Current search: <xsl:value-of select="/ucalendar/search"/> 
    1050                <span class="link">[<a href="{$selectView}">default view</a>]</span> 
     1050               <span class="link">[<a href="{$setSelection}">default view</a>]</span> 
    10511051             </xsl:when> 
    10521052           </xsl:choose> 
    10531053         </td> 
    1054          <td class="rightCell"><!--<form name="searchForm" method="get" action="{$selectView}">Search: <input type="text" name="searchString" size="30" value=""/><input type="submit" value="go"/></form>--></td> 
     1054         <td class="rightCell"><!--<form name="searchForm" method="get" action="{$setSelection}">Search: <input type="text" name="searchString" size="30" value=""/><input type="submit" value="go"/></form>--></td> 
    10551055       </tr> 
    10561056    </table> 
  • trunk/calendar3/webclient/war/WEB-INF/struts-config.xml

    r95 r104  
    179179    </action> 
    180180 
    181     <action    path="/selectCalendar" 
    182                type="org.bedework.webclient.BwCalendarAction" 
    183                name="calForm" 
    184                scope="session" 
    185                validate="false"> 
    186       <forward name="noCalDef" path="/showMain.rdo" redirect="true" /> 
    187     </action> 
    188  
    189181    <action    path="/fetchPublicCalendars" 
    190182               type="org.bedework.webclient.BwAction" 
     
    203195    </action> 
    204196 
    205     <action    path="/selectView
     197    <action    path="/setSelection
    206198               type="org.bedework.webclient.BwSelectViewAction" 
    207199               name="calForm" 
     
    211203    </action> 
    212204 
    213     <action    path="/setView
     205    <action    path="/setViewPeriod
    214206               type="org.bedework.webclient.BwGoToAction" 
    215207               name="calForm" 
  • trunk/calendar3/webclient/war/docs/header.jsp

    r94 r104  
    132132    <%-- action urls --%> 
    133133    <setup><genurl:rewrite action="setup.do"/></setup> 
    134     <selectView><genurl:rewrite action="selectView.do"/></selectView
     134    <selectViewPeriod><genurl:rewrite action="selectViewPeriod.do"/></selectViewPeriod
    135135    <setView><genurl:rewrite action="setView.do"/></setView> 
    136136    <eventView><genurl:rewrite action="eventView.do"/></eventView>