Changeset 2573

Show
Ignore:
Timestamp:
12/28/09 17:20:15
Author:
johnsa
Message:

public client: work on iphone theme

Files:

Legend:

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

    r2548 r2573  
    3838        <meta http-equiv="Pragma" content="no-cache"/> 
    3939        <meta http-equiv="Expires" content="-1"/> 
    40         <link rel="stylesheet" href="{$resourcesRoot}/pda.css"/> 
     40        <link rel="stylesheet" href="{$resourcesRoot}/css/jsphone.css"/> 
    4141      </head> 
    4242      <body> 
    43         <h1 id="homeTitle"> 
    44           Home Title Here 
    45           <span id="homeLink"> 
    46             [<a href="{$setup}&amp;browserTypeSticky=default">home</a>] 
    47           </span> 
    48         </h1> 
    49         <div id="titleBar"> 
     43        <h2 id="nav" class="title" onclick="gotourl(this, '{$setup}&amp;browserTypeSticky=default')"> 
    5044          Bedework Events Calendar 
    51         </div> 
     45        </h2> 
     46        <h1>Upcoming Events</h1> 
    5247        <xsl:call-template name="infoAndNavigation"/> 
    5348        <xsl:choose> 
     
    6762        </xsl:choose> 
    6863        <!-- footer --> 
    69         <p id="footer"> 
    70           <a href="{$setup}&amp;browserTypeSticky=PDA">Events Calendar</a> | 
    71           <a href="{$setup}&amp;browserTypeSticky=default">Home Link</a><br/> 
    72           <small>Footer Text</small> 
     64        <p class="footer"> 
     65          <a href="{$fetchPublicCalendars}">All Calendars</a> | 
     66          <a href="{$setup}&amp;browserTypeSticky=default">Reset Skin</a><br/> 
    7367        </p> 
    7468      </body> 
     
    7872  <!-- === Date Info and Navigation == --> 
    7973  <xsl:template name="infoAndNavigation"> 
    80     <div id="dateInfo"> 
    81       <xsl:if test="/bedework/page!='calendarList' and /bedework/page!='event'"> 
    82         &lt;<a href="{$setViewPeriod}&amp;date={$prevdate}">prev</a> 
    83         <xsl:text> </xsl:text> 
    84         <strong> 
    85           <xsl:choose> 
    86             <xsl:when test="/bedework/periodname='Day'"> 
    87               <xsl:value-of select="substring(/bedework/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
    88             </xsl:when> 
    89             <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    90               Week of <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
    91             </xsl:when> 
    92             <xsl:when test="/bedework/periodname='Month'"> 
    93               <xsl:value-of select="/bedework/eventscalendar/year/month/longname"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
    94             </xsl:when> 
    95             <xsl:otherwise> 
    96               <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
    97             </xsl:otherwise> 
    98           </xsl:choose> 
    99         </strong> 
    100         <xsl:text> </xsl:text> 
    101         <a href="{$setViewPeriod}&amp;date={$nextdate}">next</a>&gt; 
    102         <br /> 
    103       </xsl:if> 
    104     </div> 
    10574    <div id="mainNav"> 
    10675      <xsl:choose> 
     
    137106        </xsl:otherwise> 
    138107      </xsl:choose> 
    139       <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}"> 
    140         today 
    141       </a><br /> 
    142       <xsl:choose> 
    143         <xsl:when test="/bedework/selectionState/selectionType = 'calendar'"> 
    144           Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> 
    145           <span class="link">[<a href="{$setSelection}">show all</a>]</span> 
    146         </xsl:when> 
    147         <xsl:otherwise> 
    148           <xsl:if test="/bedework/page != 'calendarList'"> 
    149             <span class="calLinks"><a href="{$fetchPublicCalendars}">available calendars</a></span> 
    150           </xsl:if> 
    151         </xsl:otherwise> 
    152       </xsl:choose> 
     108      <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}">today</a><br/> 
     109      &lt;<a href="{$setViewPeriod}&amp;date={$prevdate}">prev</a> 
     110      <xsl:text> </xsl:text> 
     111      <a href="{$setViewPeriod}&amp;date={$nextdate}">next</a>&gt; 
     112      <xsl:if test="/bedework/selectionState/selectionType = 'calendar'"> 
     113        <br/>Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> 
     114        <span class="link">[<a href="{$setSelection}">show all</a>]</span> 
     115      </xsl:if> 
    153116    </div> 
    154117  </xsl:template> 
     
    429392  <!--==== LIST VIEW  (for day, week, and month) ====--> 
    430393  <xsl:template name="listView"> 
    431     <p> 
    432       <em> 
    433         This theme will shortly be replaced by an iphone/smartphone friendly theme. 
    434       </em> 
    435     </p> 
    436394    <xsl:choose> 
    437395      <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
     
    442400          <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
    443401            <h3> 
    444               <xsl:variable name="date" select="date"/> 
    445               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    446                 <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    447               </a> 
     402              <xsl:attribute name="onclick">gotourl(<xsl:value-of select="$setViewPeriod"/>&amp;viewType=dayView&amp;date=<xsl:value-of select="date"/>)</xsl:attribute> 
     403              <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    448404            </h3> 
    449405          </xsl:if> 
    450           <table class="eventList" border="0" cellpadding="0" cellspacing="0"
     406          <ul
    451407            <xsl:for-each select="event"> 
    452               <xsl:variable name="id" select="id"/> 
    453               <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    454               <xsl:variable name="guid" select="guid"/> 
    455               <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    456               <tr> 
     408              <li> 
     409                <xsl:attribute name="id"><xsl:value-of select="guid"/></xsl:attribute> 
     410                <xsl:attribute name="onclick">gotourl(<xsl:value-of select="$eventView"/>&amp;calPath=<xsl:value-of select="calendar/encodedPath"/>&amp;guid=<xsl:value-of select="guid"/>&amp;recurrenceId=<xsl:value-of select="recurrenceId"/>)</xsl:attribute> 
    457411                <xsl:choose> 
    458412                  <xsl:when test="position() mod 2 = 0"> 
    459                     <xsl:attribute name="class">a</xsl:attribute> 
     413                    <xsl:attribute name="class">even</xsl:attribute> 
    460414                  </xsl:when> 
    461415                  <xsl:otherwise> 
    462                     <xsl:attribute name="class">b</xsl:attribute> 
     416                    <xsl:attribute name="class">odd</xsl:attribute> 
    463417                  </xsl:otherwise> 
    464418                </xsl:choose> 
    465                 <td class="date"> 
    466                   <xsl:choose> 
    467                     <xsl:when test="start/allday = 'true' and 
    468                                     start/shortdate = end/shortdate"> 
    469                       all day 
    470                     </xsl:when> 
    471                     <xsl:when test="start/shortdate = end/shortdate and 
    472                                     start/time = end/time"> 
    473                       <xsl:value-of select="start/time"/> 
    474                     </xsl:when> 
    475                     <xsl:otherwise> 
    476                       <xsl:choose> 
    477                         <xsl:when test="start/allday = 'true' and 
    478                                         parent::day/shortdate = start/shortdate"> 
    479                           today 
    480                         </xsl:when> 
    481                         <xsl:when test="parent::day/shortdate != start/shortdate"> 
    482                           <span class="littleArrow">&#171;</span> 
    483                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    484                         </xsl:when> 
    485                         <xsl:otherwise> 
    486                           <xsl:value-of select="start/time"/> 
    487                         </xsl:otherwise> 
    488                       </xsl:choose> 
    489                       - 
    490                       <xsl:choose> 
    491                         <xsl:when test="end/allday = 'true' and 
    492                                         parent::day/shortdate = end/shortdate"> 
    493                           today 
    494                         </xsl:when> 
    495                         <xsl:when test="parent::day/shortdate != end/shortdate"> 
    496                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    497                           <span class="littleArrow">&#187;</span> 
    498                         </xsl:when> 
    499                         <xsl:otherwise> 
    500                           <xsl:value-of select="end/time"/> 
    501                         </xsl:otherwise> 
    502                       </xsl:choose> 
    503                     </xsl:otherwise> 
    504                   </xsl:choose> 
    505                 </td> 
    506                 <td class="description"> 
    507                   <xsl:if test="status='CANCELLED'"><strong>CANCELED: </strong></xsl:if> 
    508                   <xsl:choose> 
    509                     <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    510                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    511                         <strong> 
    512                           <xsl:value-of select="summary"/>: 
    513                         </strong> 
    514                         <xsl:value-of select="description"/>&#160; 
    515                         <em> 
    516                           <xsl:value-of select="location/address"/> 
    517                           <xsl:if test="location/subaddress != ''"> 
    518                             , <xsl:value-of select="location/subaddress"/> 
    519                           </xsl:if>.&#160; 
    520                           <xsl:if test="cost!=''"> 
    521                             <xsl:value-of select="cost"/>.&#160; 
    522                           </xsl:if> 
    523                           <xsl:if test="contact/name!='none'"> 
    524                             Contact: <xsl:value-of select="contact/name"/> 
    525                           </xsl:if> 
    526                         </em> 
    527                         - <xsl:value-of select="calendar/name"/> 
    528                       </a> 
    529                       <xsl:if test="link != ''"> 
    530                         <xsl:variable name="link" select="link"/> 
    531                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    532                       </xsl:if> 
    533                     </xsl:when> 
    534                     <xsl:otherwise> 
    535                       <a href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    536                         <xsl:value-of select="summary"/> 
    537                       </a> 
    538                     </xsl:otherwise> 
    539                   </xsl:choose> 
    540                 </td> 
    541               </tr> 
     419                <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/> 
     420                <xsl:choose> 
     421                  <xsl:when test="start/allday = 'true'">(all day)</xsl:when> 
     422                  <xsl:otherwise> at <xsl:value-of select="start/time"/></xsl:otherwise> 
     423                </xsl:choose> 
     424                <br/> 
     425                <strong> 
     426                  <xsl:if test="status='CANCELLED'">CANCELED: </xsl:if> 
     427                  <xsl:value-of select="summary"/> 
     428                </strong> 
     429              </li> 
    542430            </xsl:for-each> 
    543           </table
     431          </ul
    544432        </xsl:for-each> 
    545433      </xsl:otherwise>