Changeset 142

Show
Ignore:
Timestamp:
02/09/06 22:33:53
Author:
johnsa
Message:

got video skin working and added its css
updates to make rss skin more generic

Files:

Legend:

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

    r141 r142  
    10241024        <td class="rightCell"> 
    10251025          <form name="styleSelectForm" method="get" action="{$setup}"> 
    1026             style selector: 
    10271026            <select name="setappvar" onChange="submit()"> 
    1028               <option>choose a style</option> 
     1027              <option>example styles:</option> 
    10291028              <option value="style(green)">green</option> 
    10301029              <option value="style(red)">red</option> 
     
    10331032          </form> 
    10341033          <form name="skinSelectForm" method="get" action="{$setup}"> 
    1035             skin examples: 
    10361034            <input type="hidden" name="setappvar" value="summaryMode(details)"/> 
    10371035            <select name="skinName" onchange="submit()"> 
    1038               <option>select a skin</option> 
     1036              <option>example skins:</option> 
    10391037              <option value="rss">rss feed</option> 
    10401038              <option value="jsToday">javascript feed</option> 
     
    10441042          </form> 
    10451043          <form name="skinSelectForm" method="get" action=""> 
    1046             production examples: 
    10471044            <select name="sitePicker" onchange="window.location = this.value"> 
    1048               <option>select a calendar</option> 
     1045              <option>production examples:</option> 
    10491046              <option value="http://events.rpi.edu">Rensselaer</option> 
    10501047              <option value="http://myuw.washington.edu/cal/">Washington</option> 
  • trunk/calendar3/deployment/webpublic/webapp/resources/demoskins/default/default/rss.xsl

    r108 r142  
    1212     <rss version="2.0"> 
    1313      <channel> 
    14         <title>Rensselaer Events Calendar</title> 
     14        <title>Bedework Events Calendar</title> 
    1515        <link><xsl:value-of select="/bedework/urlprefix"/></link> 
    16         <description>Rensselaer Events</description> 
    17         <language>en-us</language> 
    18         <copyright>Copyright <xsl:value-of select="substring(/bedework/currentdate,1,4)"/>, Rensselaer Polytechnic Institute</copyright> 
    19         <managingEditor>wentod@rpi.edu, Deb Wentorf</managingEditor> 
     16        <description>My Site's Events</description> 
     17        <language>en-US</language> 
     18        <copyright>Copyright <xsl:value-of select="substring(/bedework/currentdate,1,4)"/>, Your Institution Here</copyright> 
     19        <managingEditor>editor@mysite.edu, Editor Name</managingEditor> 
    2020        <xsl:apply-templates select="/bedework//event"/> 
    2121      </channel> 
  • trunk/calendar3/deployment/webpublic/webapp/resources/demoskins/default/default/videocal.xsl

    r140 r142  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33  <xsl:output method="html" indent="yes" media-type="text/html" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd" standalone="yes"/> 
    4   <!-- ================ --> 
    5   <!--  DEFAULT STYLESHEET --> 
    6   <!-- ================  --> 
     4  <!-- ======================= --> 
     5  <!--  VIDEO FEED STYLESHEET  --> 
     6  <!-- ======================= --> 
     7   
     8  <!-- Run your browser full screen at 800 x 600 and feed this to video. 
     9       There are better approaches to this, but it's an interesting example. --> 
     10   
    711  <!-- DEFINE GLOBAL CONSTANTS --> 
    8   <xsl:variable name="appRoot" select="/ucalendar/approot"/> 
    9   <xsl:variable name="urlPrefix" select="/ucalendar/urlprefix"/> 
    10   <xsl:variable name="prevDate" select="/ucalendar/previousdate"/> 
    11   <xsl:variable name="nextDate" select="/ucalendar/nextdate"/> 
    12   <xsl:variable name="curDate" select="/ucalendar/currentdate"/> 
     12  <xsl:variable name="appRoot" select="/bedework/approot"/> 
     13  <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> 
     14  <xsl:variable name="prevDate" select="/bedework/previousdate"/> 
     15  <xsl:variable name="nextDate" select="/bedework/nextdate"/> 
     16  <xsl:variable name="curDate" select="/bedework/currentdate/date"/> 
    1317     
    1418  <!-- Duration of each slide in seconds; set this to your preference --> 
     
    2428  <xsl:variable name="day"> 
    2529    <xsl:choose> 
    26       <xsl:when test="/ucalendar/appvar[key='day']">         
     30      <xsl:when test="/bedework/appvar[key='day']">         
    2731        <xsl:choose> 
    28           <xsl:when test="/ucalendar/appvar[key='day']/value > $dayCount">1</xsl:when> 
     32          <xsl:when test="/bedework/appvar[key='day']/value > $dayCount">1</xsl:when> 
    2933          <xsl:otherwise> 
    30             <xsl:value-of select="/ucalendar/appvar[key='day']/value"/> 
     34            <xsl:value-of select="/bedework/appvar[key='day']/value"/> 
    3135          </xsl:otherwise> 
    3236        </xsl:choose> 
     
    4044   
    4145  <!-- Event count for the current day --> 
    42   <xsl:variable name="eventCount" select="count(/ucalendar/eventscalendar/year/month/week/day[date=$curDate]/event)"/> 
     46  <xsl:variable name="eventCount" select="count(/bedework/eventscalendar/year/month/week/day[date=$curDate]/event)"/> 
    4347   
    4448  <!-- Position of the current event being displayed --> 
    4549  <xsl:variable name="event"> 
    4650    <xsl:choose> 
    47       <xsl:when test="/ucalendar/appvar[key='event']">         
     51      <xsl:when test="/bedework/appvar[key='event']">         
    4852        <xsl:choose> 
    49           <xsl:when test="/ucalendar/appvar[key='event']/value > $eventCount">1</xsl:when> 
     53          <xsl:when test="/bedework/appvar[key='event']/value > $eventCount">1</xsl:when> 
    5054          <xsl:otherwise> 
    51             <xsl:value-of select="/ucalendar/appvar[key='event']/value"/> 
     55            <xsl:value-of select="/bedework/appvar[key='event']/value"/> 
    5256          </xsl:otherwise> 
    5357        </xsl:choose> 
     
    6468    <html lang="en"> 
    6569      <head> 
    66         <title>Rensselaer Institutional Calendar of Events</title> 
    67         <link rel="stylesheet" href="{$appRoot}/en_US/default/videocalLarger.css"/> 
     70        <title>Event Calendar Video Feed</title> 
     71        <link rel="stylesheet" href="{$appRoot}/default/default/videocal.css"/> 
    6872        <meta name="robots" content="noindex,nofollow"/> 
    6973        <script language="JavaScript"> 
     
    8185        </script> 
    8286        <xsl:choose> 
    83           <xsl:when test="/ucalendar/periodname!='Day'"> 
     87          <xsl:when test="/bedework/periodname!='Day'"> 
    8488            <!-- we're starting up on the wrong view; go to today and begin with the first event; 
    8589                 the title slide will display during this switch. --> 
    86             <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setView.do?viewType=todayView&amp;setappvar=event(1)&amp;setappvar=day(1)&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/> 
     90            <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setViewPeriod.do?viewType=todayView&amp;setappvar=event(1)&amp;setappvar=day(1)&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/> 
    8791          </xsl:when> 
    8892          <xsl:when test="($nextDay > $dayCount) and ($nextEvent > $eventCount)"> 
     
    9094                 so start over: go to today, set day=1 and *event=0* to allow  
    9195                 for the title slide "calPlug" --> 
    92             <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setView.do?viewType=todayView&amp;setappvar=event(0)&amp;setappvar=day(1)&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/>           
     96            <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setViewPeriod.do?viewType=todayView&amp;setappvar=event(0)&amp;setappvar=day(1)&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/>           
    9397          </xsl:when> 
    9498          <xsl:when test="$nextEvent > $eventCount"> 
    9599            <!-- passed the last event for the day; go to the next day and set event=1 --> 
    96             <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setView.do?date={$nextDate}&amp;viewType=dayView&amp;setappvar=event(1)&amp;setappvar=day({$nextDay})&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/> 
     100            <meta http-equiv="refresh" content="{$slideDuration};url={$urlPrefix}/setViewPeriod.do?date={$nextDate}&amp;viewType=dayView&amp;setappvar=event(1)&amp;setappvar=day({$nextDay})&amp;skinNameSticky={$skinName}&amp;setappvar=summaryMode(details)"/> 
    97101          </xsl:when> 
    98102          <xsl:otherwise> 
     
    104108      <body> 
    105109        <xsl:choose> 
    106           <xsl:when test="($eventCount = 0) or ($event = 0) or (/ucalendar/periodname!='Day')"> 
     110          <xsl:when test="($eventCount = 0) or ($event = 0) or (/bedework/periodname!='Day')"> 
    107111            <div id="calPlug"> 
    108112              <h1> 
    109                 Rensselaer Institutional<br/> 
    110                 Calendar of Events 
     113                Bedework Calendar of Events 
     114                Video Feed 
    111115              </h1> 
    112               <h2>http://j2ee.rpi.edu/cal</h2> 
     116              <h2>http://www.bedework.org</h2> 
    113117            </div> 
    114118          </xsl:when> 
    115119          <xsl:otherwise> 
    116120            <h2 id="calTitle"> 
    117               RENSSELAER'S INSTITUTIONAL CALENDAR OF EVENTS 
     121              BEDEWORK CALENDAR OF EVENTS 
    118122            </h2> 
    119123            <h2 id="dayTitle"> 
    120               <xsl:value-of select="/ucalendar/firstday"/><!--  
     124              <xsl:value-of select="/bedework/firstday/longdate"/><!--  
    121125              <br/>Events: <xsl:value-of select="$event"/> of <xsl:value-of select="$eventCount"/> 
    122126              <br/>Days: <xsl:value-of select="$day"/> of <xsl:value-of select="$dayCount"/> --> 
    123127            </h2>     
    124             <xsl:apply-templates select="/ucalendar/eventscalendar/year/month/week/day[date=$curDate]/event[position()=$event]"/> 
     128            <xsl:apply-templates select="/bedework/eventscalendar/year/month/week/day[date=$curDate]/event[position()=$event]"/> 
    125129          </xsl:otherwise> 
    126         </xsl:choose> 
     130        </xsl:choose>    
     131        <!-- remove the following two divs if used for video --> 
     132        <div id="getBack"> 
     133          (<a href="setup.do?skinNameSticky=default">restore normal calendar</a>) 
     134        </div> 
     135        <div id="info"> 
     136          This stylesheet will rotate through five days of events at ten  
     137          second intervals.  It is intended as a video feed.  It's settings  
     138          can be set from the top of 
     139          the videocal.xsl stylesheet. 
     140        </div> 
    127141      </body> 
    128142    </html> 
     
    132146  <xsl:template match="event"> 
    133147    <h1> 
    134       <xsl:value-of select="shortdesc"/> 
     148      <xsl:value-of select="summary"/> 
    135149    </h1> 
    136     <xsl:if test="(start/time!='12:00 AM') and (end/time!='12:00 AM')"> 
     150    <xsl:if test="(start/allday = 'false')"> 
    137151      <div id="time"> 
     152        <!-- this logic needs to be updated for new event model --> 
    138153        <xsl:choose> 
    139154          <xsl:when test="start/time=''"> 
    140155            <xsl:value-of select="start/shortdate"/> 
    141156          </xsl:when> 
    142           <xsl:when test="start/date!=/ucalendar/firstday"> 
     157          <xsl:when test="start/date != /bedework/firstday"> 
    143158            <xsl:value-of select="start/shortdate"/> 
    144159            <xsl:value-of select="start/time"/> 
     
    148163          </xsl:otherwise> 
    149164        </xsl:choose> 
    150         <xsl:if test="end/time != '' or end/longdate != start/longdate"> - </xsl:if> 
     165        -          
    151166        <xsl:if test="end/longdate != start/longdate"> 
    152167          <xsl:value-of select="end/shortdate"/> 
    153           <xsl:text> </xsl:text> 
     168          <xsl:text> </xsl:text>         
    154169        </xsl:if> 
    155         <xsl:if test="end/time != ''"> 
    156           <xsl:value-of select="end/time"/> 
    157         </xsl:if> 
     170        <xsl:value-of select="end/time"/> 
    158171      </div> 
    159172    </xsl:if> 
     
    164177    </xsl:if> 
    165178    <div id="description"> 
    166       <xsl:value-of select="longdesc"/> 
     179      <xsl:value-of select="description"/> 
    167180    </div> 
    168181  </xsl:template>