Changeset 1408

Show
Ignore:
Timestamp:
06/08/07 17:04:57
Author:
johnsa
Message:

user client: add freebusy display to attendees & recipients selection (beginning stages)

Files:

Legend:

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

    r1406 r1408  
    931931  padding: 0; 
    932932} 
    933 #bedework table#attendees th { 
     933#bedework table.widget { 
     934  margin: 1em 1em 0 0; 
     935  float: right; 
     936  clear: right; 
     937
     938#bedework table.widget th { 
    934939  padding: 0 2em 0.1em 0; 
    935   background-color: white
     940  background-color: #ddd
    936941  color: black; 
    937942  border-bottom: 1px dotted #333; 
    938943  font-size: 0.9em; 
    939944} 
    940 #bedework table#attendees td { 
    941   padding: 0 2em 0.1em 0
    942   font-size: 0.8em; 
    943 } 
    944 #bedework table#attendees td.role, 
    945 table#attendees td.status { 
     945#bedework table.widget td { 
     946  padding: 0.1em 1em
     947  font-size: 0.8em; 
     948} 
     949#bedework table.widget td.role, 
     950#bedework table.widget td.status { 
    946951  text-transform: lowercase; 
    947952} 
    948 #bedework table#attendees.widget { 
     953#bedework table.widget { 
    949954  border: 1px solid #999; 
    950955} 
    951 #bedework table#attendees.widget td, 
    952 table#attendees.widget th { 
    953   padding: 0.2em 0 0.1em 1em; 
    954   text-align: left; 
    955 
    956 #bedework table#attendees.widget td.trash { 
     956#bedework table.widget td, 
     957#bedework table.widget th { 
     958  text-align: left; 
     959
     960#bedework table.widget td.trash { 
    957961  width: 15px; 
     962  padding: 4px 6px 4px 4px; 
    958963} 
    959964#bedework #recipientsAndAttendees { 
    960965  margin: 0; 
    961   padding: 1em; 
     966  padding: 0 1em; 
    962967} 
    963968/* dialog box - popup, most likely deprectaed */ 
     
    15661571  right: 20px; 
    15671572  width: 300px; 
     1573} 
     1574#freeBusyAgg { 
     1575  clear: both; 
     1576  margin: 1em; 
     1577} 
     1578#freeBusyAgg td { 
     1579  vertical-align: middle; 
     1580  text-align: center; 
     1581  padding: 0; 
     1582  margin: 0; 
     1583} 
     1584#freeBusyAgg th.left { 
     1585  text-align: left; 
     1586} 
     1587#freeBusyAgg td.morning { 
     1588  color: black; 
     1589  background: #ddf; 
     1590} 
     1591#freeBusyAgg td.evening { 
     1592  color: black; 
     1593  background: #dde; 
     1594} 
     1595#freeBusyAgg td.timeLabels { 
     1596  vertical-align: middle; 
     1597  text-align: center; 
     1598  font-size: 0.8em; 
     1599  font-weight: normal; 
     1600  padding: 0; 
     1601  margin: 0; 
     1602} 
     1603#freeBusyAgg td.dayDate { 
     1604  white-space: nowrap; 
     1605} 
     1606#freeBusyAgg td.free, 
     1607#freeBusyAggKey td.free { 
     1608  color: #A3BAEA; 
     1609  background-color: #A3BAEA; 
     1610} 
     1611#freeBusyAgg td.busy, 
     1612#freeBusyAggKey td.busy { 
     1613  color: #fbb; 
     1614  background-color: #fbb; 
     1615} 
     1616#freeBusyAgg td.tentative, 
     1617#freeBusyAggKey td.tentative { 
     1618  color: #ddd; 
     1619  background: #ddd url('../../resources/tentativeLines.gif') top; 
     1620} 
     1621#freeBusyAggKey { 
     1622  margin: 0.5em auto 0 auto; 
     1623} 
     1624#freeBusyAggKey td { 
     1625  padding: 5px; 
     1626} 
     1627#freeBusyAgg td.free a { 
     1628  color: #A3BAEA; 
     1629  background-color: transparent; 
     1630  display: block; 
     1631  padding: 3px 3px; 
     1632  width: 10px; 
     1633  height: 10px; 
     1634  text-decoration: none; 
     1635} 
     1636#freeBusyAgg td.tentative a  { 
     1637  color: #333; 
     1638  background-color: transparent; 
     1639  display: block; 
     1640  padding: 3px 3px; 
     1641  width: 10px; 
     1642  height: 10px; 
     1643  text-decoration: none; 
     1644} 
     1645#freeBusyAgg td.busy a { 
     1646  color: #333; 
     1647  background-color: transparent; 
     1648  display: block; 
     1649  padding: 3px 3px; 
     1650  width: 10px; 
     1651  height: 10px; 
     1652  text-decoration: none; 
     1653} 
     1654#freeBusyAgg td.busy a:hover, 
     1655#freeBusyAgg td.free a:hover, 
     1656#freeBusyAgg td.tentative a:hover  { 
     1657  color: black; 
     1658  background-color: yellow; 
     1659  text-decoration: none; 
     1660} 
     1661#freeBusyAgg a:hover { 
     1662  /* required for eventTip to hover correctly; 
     1663     apply only to the hover pseudo class, or 
     1664     the other anchors nearby will cover the eventTip in IE */ 
     1665  position: relative; 
     1666} 
     1667#freeBusyAgg a span.eventTip { 
     1668  display: none; 
     1669} 
     1670#freeBusyAgg a:hover span.eventTip { 
     1671  display: block; 
     1672  position: absolute; 
     1673  width: 8em; 
     1674  top: 3em; 
     1675  left: -4em; 
     1676  background-color: #ffe; 
     1677  color: black; 
     1678  padding: 4px; 
     1679  border: 1px solid #333; 
     1680} 
     1681#freeBusyAgg #timezonesDropDown { 
     1682  width: 14em; 
     1683  font-size: 8pt; 
     1684  margin: 0 0 0 2em; 
     1685} 
     1686#freeBusyAgg #timezonesButton { 
     1687  font-size: 8pt; 
    15681688} 
    15691689#bedework #sharingBox { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1405 r1408  
    18661866          <input name="cancelled" type="submit" value="cancel"/> 
    18671867        </span> 
    1868         Edit Event 
     1868        Edit  
     1869        <xsl:choose>   
     1870          <xsl:when test="form/scheduleMethod = 2">Meeting</xsl:when> 
     1871          <xsl:otherwise>Event</xsl:otherwise> 
     1872        </xsl:choose> 
    18691873      </h2> 
    18701874      <xsl:apply-templates select="." mode="eventForm"/> 
     
    32963300    </h2> 
    32973301 
    3298     <!-- event form submenu --> 
     3302    <xsl:if test="/bedework/attendees/attendee"> 
     3303      <table id="attendees" class="widget" cellspacing="0"> 
     3304        <tr> 
     3305          <th colspan="4">Attendees</th> 
     3306        </tr> 
     3307        <!--<tr> 
     3308          <td>attendee</td> 
     3309          <td>role</td> 
     3310          <td>status</td> 
     3311        </tr>--> 
     3312        <xsl:for-each select="/bedework/attendees/attendee"> 
     3313          <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
     3314          <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
     3315          <xsl:variable name="attendeeUri" select="attendeeUri"/> 
     3316          <tr> 
     3317            <td class="trash"> 
     3318              <a href="{$event-attendeesForEvent}&amp;uri={$attendeeUri}&amp;attendee=true&amp;delete=true" title="remove"> 
     3319                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
     3320              </a> 
     3321            </td> 
     3322            <td> 
     3323              <a href="{$attendeeUri}"> 
     3324                <xsl:choose> 
     3325                  <xsl:when test="cn != ''"> 
     3326                    <xsl:value-of select="cn"/> 
     3327                  </xsl:when> 
     3328                  <xsl:otherwise> 
     3329                    <xsl:value-of select="attendeeUri"/> 
     3330                  </xsl:otherwise> 
     3331                </xsl:choose> 
     3332              </a> 
     3333            </td> 
     3334            <td class="role"> 
     3335              <xsl:value-of select="role"/> 
     3336            </td> 
     3337            <td class="status"> 
     3338              <xsl:value-of select="partstat"/> 
     3339            </td> 
     3340          </tr> 
     3341        </xsl:for-each> 
     3342      </table> 
     3343    </xsl:if> 
     3344 
     3345    <xsl:if test="/bedework/recipients/recipient"> 
     3346      <table id="recipients" class="widget" cellspacing="0"> 
     3347        <tr> 
     3348          <th colspan="2">Recipients</th> 
     3349        </tr> 
     3350        <xsl:for-each select="/bedework/recipients/recipient"> 
     3351          <xsl:variable name="recipientUri" select="."/> 
     3352          <tr> 
     3353            <td class="trash"> 
     3354              <a href="{$event-attendeesForEvent}&amp;uri={$recipientUri}&amp;recipient=true&amp;delete=true" title="remove"> 
     3355                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
     3356              </a> 
     3357            </td> 
     3358            <td> 
     3359              <a href="{$recipientUri}"> 
     3360                <xsl:value-of select="."/> 
     3361              </a> 
     3362            </td> 
     3363          </tr> 
     3364        </xsl:for-each> 
     3365      </table> 
     3366    </xsl:if> 
     3367     
    32993368    <div id="recipientsAndAttendees"> 
    3300       <h4> Add recipients and attendees</h4> 
    3301  
    3302       <form name="raForm" id="recipientsAndAttendees" action="{$event-attendeesForEvent}" method="post"> 
     3369      <h4> Add recipients and attendees</h4>       
     3370      <form name="raForm" id="recipientsAndAttendeesForm" action="{$event-attendeesForEvent}" method="post"> 
    33033371        <div id="raContent"> 
    3304           <table cellspacing="0"> 
    3305             <tr> 
    3306               <td> 
    3307                 <input name="uri" width="40"/> 
    3308                 <input type="submit" value="add" /> 
    3309                 <br/> 
    3310                 <input type="checkbox" name="recipient" value="true" checked="checked"/> recipient 
    3311                 <input type="checkbox" name="attendee" value="true" checked="checked"/> attendee 
    3312               </td> 
    3313               <td> 
    3314                 Role: 
    3315                 <select name="role"> 
    3316                   <option value="REQ-PARTICIPANT">required participant</option> 
    3317                   <option value="OPT-PARTICIPANT">optional participant</option> 
    3318                   <option value="CHAIR">chair</option> 
    3319                   <option value="NON-PARTICIPANT">non-participant</option> 
    3320                 </select><br/> 
    3321                 Status: 
    3322                 <select name="partstat"> 
    3323                   <option value="NEEDS-ACTION">needs action</option> 
    3324                   <option value="ACCEPTED">accepted</option> 
    3325                   <option value="DECLINED">declined</option> 
    3326                   <option value="TENTATIVE">tentative</option> 
    3327                   <option value="DELEGATED">delegated</option> 
    3328                 </select> 
    3329               </td> 
    3330             </tr> 
    3331           </table> 
    3332  
    3333           <xsl:if test="/bedework/attendees/attendee"> 
    3334             <table id="attendees" class="widget" cellspacing="0"> 
     3372          <input name="uri" width="40"/> 
     3373          <input type="submit" value="add" /> 
     3374          <br/> 
     3375          <input type="checkbox" name="recipient" value="true" checked="checked"/> recipient 
     3376          <input type="checkbox" name="attendee" value="true" checked="checked"/> attendee 
     3377          <br/> 
     3378          Role: 
     3379          <select name="role"> 
     3380            <option value="REQ-PARTICIPANT">required participant</option> 
     3381            <option value="OPT-PARTICIPANT">optional participant</option> 
     3382            <option value="CHAIR">chair</option> 
     3383            <option value="NON-PARTICIPANT">non-participant</option> 
     3384          </select> 
     3385          <br/> 
     3386          Status: 
     3387          <select name="partstat"> 
     3388            <option value="NEEDS-ACTION">needs action</option> 
     3389            <option value="ACCEPTED">accepted</option> 
     3390            <option value="DECLINED">declined</option> 
     3391            <option value="TENTATIVE">tentative</option> 
     3392            <option value="DELEGATED">delegated</option> 
     3393          </select> 
     3394 
     3395          <xsl:for-each select="/bedework/freebusy"> 
     3396          <!-- there's only one collection of freebusy; this for-each is 
     3397               being used to pick out just the freebusy node and 
     3398               shorten the select statements below. --> 
     3399            <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> 
     3400            <xsl:variable name="formattedStartDate"> 
     3401              <xsl:value-of select="substring(start,1,4)"/>-<xsl:value-of select="number(substring(start,5,2))"/>-<xsl:value-of select="number(substring(start,7,2))"/> 
     3402            </xsl:variable> 
     3403            <xsl:variable name="formattedEndDate"> 
     3404              <xsl:value-of select="substring(end,1,4)"/>-<xsl:value-of select="number(substring(end,5,2))"/>-<xsl:value-of select="number(substring(end,7,2))"/> 
     3405            </xsl:variable> 
     3406     
     3407            <table id="freeBusyAgg"> 
    33353408              <tr> 
    3336                 <th colspan="4">Attendees</th> 
     3409                <td></td> 
     3410                <th colspan="24" class="left"> 
     3411                  Freebusy for 
     3412                  <span class="who"> 
     3413                    <xsl:choose> 
     3414                      <xsl:when test="who != ''"> 
     3415                        <xsl:value-of select="who"/> 
     3416                      </xsl:when> 
     3417                      <xsl:otherwise> 
     3418                        all attendees 
     3419                      </xsl:otherwise> 
     3420                    </xsl:choose> 
     3421                  </span> 
     3422                </th> 
     3423                <!--<th colspan="32" class="right"> 
     3424                  <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> 
     3425                  <select name="timezone" id="timezonesDropDown" onchange="submit()"> 
     3426                    <xsl:for-each select="/bedework-fbaggregator/timezones/tzid"> 
     3427                      <option> 
     3428                        <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute> 
     3429                        <xsl:if test="node() = $currentTimezone"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
     3430                        <xsl:value-of select="."/> 
     3431                      </option> 
     3432                    </xsl:for-each> 
     3433                  </select> 
     3434                </th>--> 
    33373435              </tr> 
    3338               <!--<tr> 
    3339                 <td>attendee</td> 
    3340                 <td>role</td> 
    3341                 <td>status</td> 
    3342               </tr>--> 
    3343               <xsl:for-each select="/bedework/attendees/attendee"> 
    3344                 <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    3345                 <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
    3346                 <xsl:variable name="attendeeUri" select="attendeeUri"/> 
     3436              <tr> 
     3437                <td>&#160;</td> 
     3438                <td colspan="12" class="morning">AM</td> 
     3439                <td colspan="12" class="evening">PM</td> 
     3440              </tr> 
     3441              <tr> 
     3442                <td>&#160;</td> 
     3443                <xsl:for-each select="day[position()=1]/period"> 
     3444                  <td class="timeLabels"> 
     3445                    <xsl:choose> 
     3446                      <xsl:when test="number(start) mod 200 = 0"> 
     3447                        <xsl:call-template name="timeFormatter"> 
     3448                          <xsl:with-param name="timeString" select="start"/> 
     3449                          <xsl:with-param name="showMinutes">no</xsl:with-param> 
     3450                          <xsl:with-param name="showAmPm">no</xsl:with-param> 
     3451                        </xsl:call-template> 
     3452                      </xsl:when> 
     3453                      <xsl:otherwise> 
     3454                        &#160; 
     3455                      </xsl:otherwise> 
     3456                    </xsl:choose> 
     3457                  </td> 
     3458                </xsl:for-each> 
     3459              </tr> 
     3460              <xsl:for-each select="day"> 
    33473461                <tr> 
    3348                   <td class="trash"> 
    3349                     <a href="{$event-attendeesForEvent}&amp;uri={$attendeeUri}&amp;attendee=true&amp;delete=true" title="remove"> 
    3350                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
    3351                     </a> 
    3352                   </td> 
    3353                   <td> 
    3354                     <a href="{$attendeeUri}"> 
    3355                       <xsl:choose> 
    3356                         <xsl:when test="cn != ''"> 
    3357                           <xsl:value-of select="cn"/> 
    3358                         </xsl:when> 
    3359                         <xsl:otherwise> 
    3360                           <xsl:value-of select="attendeeUri"/> 
    3361                         </xsl:otherwise> 
    3362                       </xsl:choose> 
    3363                     </a> 
    3364                   </td> 
    3365                   <td class="role"> 
    3366                     <xsl:value-of select="role"/> 
    3367                   </td> 
    3368                   <td class="status"> 
    3369                     <xsl:value-of select="partstat"/> 
    3370                   </td> 
     3462                  <td class="dayDate"><xsl:value-of select="number(substring(dateString,5,2))"/>-<xsl:value-of select="number(substring(dateString,7,2))"/></td> 
     3463                  <xsl:for-each select="period"> 
     3464                    <xsl:variable name="startTime" select="start"/> 
     3465                    <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> 
     3466                    <xsl:variable name="startDate"><xsl:value-of select="../dateString"/>T<xsl:value-of select="start"/>00</xsl:variable> 
     3467                    <xsl:variable name="meetingDuration" select="length"/> 
     3468                    <td> 
     3469                      <xsl:attribute name="class"> 
     3470                        <xsl:choose> 
     3471                          <xsl:when test="fbtype = '0'">busy</xsl:when> 
     3472                          <xsl:when test="fbtype = '3'">tentative</xsl:when> 
     3473                          <xsl:otherwise>free</xsl:otherwise> 
     3474                        </xsl:choose> 
     3475                      </xsl:attribute> 
     3476                      <a href="{$initEvent}&amp;meetingStartdt={$startDate}&amp;meetingDuration={$meetingDuration}"> 
     3477                        <xsl:choose> 
     3478                          <xsl:when test="((numBusy &gt; 0) and (numBusy &lt; 9)) or ((numTentative &gt; 0) and (numTentative &lt; 9)) and (number(numBusy) + number(numTentative) &lt; 9)"> 
     3479                            <xsl:value-of select="number(numBusy) + number(numTentative)"/> 
     3480                          </xsl:when> 
     3481                          <xsl:otherwise>*</xsl:otherwise> 
     3482                        </xsl:choose> 
     3483                        <span class="eventTip"> 
     3484                          <xsl:value-of select="$formattedStartDate"/><br/> 
     3485                          <strong> 
     3486                            <xsl:call-template name="timeFormatter"> 
     3487                              <xsl:with-param name="timeString" select="$startTime"/> 
     3488                            </xsl:call-template> 
     3489                          </strong> 
     3490                          <xsl:if test="numBusy &gt; 0"> 
     3491                            <br/><xsl:value-of select="numBusy"/> busy 
     3492                          </xsl:if> 
     3493                          <xsl:if test="numTentative &gt; 0"> 
     3494                            <br/><xsl:value-of select="numTentative"/> tentative 
     3495                          </xsl:if> 
     3496                          <xsl:if test="numBusy = 0 and numTentative = 0"> 
     3497                            <br/><em>all free</em> 
     3498                          </xsl:if> 
     3499                        </span> 
     3500                      </a> 
     3501                    </td> 
     3502                  </xsl:for-each> 
    33713503                </tr> 
    33723504              </xsl:for-each> 
    33733505            </table> 
    3374           </xsl:if> 
    3375  
    3376           <xsl:if test="/bedework/recipients/recipient"> 
    3377             <table id="attendees" class="widget" cellspacing="0"> 
     3506 
     3507            <table id="freeBusyKey"> 
    33783508              <tr> 
    3379                 <th colspan="2">Recipients</th> 
     3509                <td class="free">*</td> 
     3510                <td>free</td> 
     3511                <td>&#160;</td> 
     3512                <td class="busy">*</td> 
     3513                <td>busy</td> 
     3514                <td>&#160;</td> 
     3515                <td class="tentative">*</td> 
     3516                <td>tentative</td> 
    33803517              </tr> 
    3381               <xsl:for-each select="/bedework/recipients/recipient"> 
    3382                 <xsl:variable name="recipientUri" select="."/> 
    3383                 <tr> 
    3384                   <td class="trash"> 
    3385                     <a href="{$event-attendeesForEvent}&amp;uri={$recipientUri}&amp;recipient=true&amp;delete=true" title="remove"> 
    3386                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
    3387                     </a> 
    3388                   </td> 
    3389                   <td> 
    3390                     <a href="{$recipientUri}"> 
    3391                       <xsl:value-of select="."/> 
    3392                     </a> 
    3393                   </td> 
    3394                 </tr> 
    3395               </xsl:for-each> 
    33963518            </table> 
    3397           </xsl:if
     3519          </xsl:for-each
    33983520 
    33993521          <p><input type="button" value="continue" onclick="window.location='{$gotoEditEvent}'"/></p> 
     
    71737295  <!--==== UTILITY TEMPLATES ====--> 
    71747296 
     7297  <!-- time formatter (should be extended as needed) --> 
     7298  <xsl:template name="timeFormatter"> 
     7299    <xsl:param name="timeString"/><!-- required --> 
     7300    <xsl:param name="showMinutes">yes</xsl:param> 
     7301    <xsl:param name="showAmPm">yes</xsl:param> 
     7302    <xsl:param name="hour24">no</xsl:param> 
     7303    <xsl:variable name="hour" select="number(substring($timeString,1,2))"/> 
     7304    <xsl:variable name="minutes" select="substring($timeString,3,2)"/> 
     7305    <xsl:variable name="AmPm"> 
     7306      <xsl:choose> 
     7307        <xsl:when test="$hour &lt; 12">AM</xsl:when> 
     7308        <xsl:otherwise>PM</xsl:otherwise> 
     7309      </xsl:choose> 
     7310    </xsl:variable> 
     7311    <xsl:choose> 
     7312      <xsl:when test="hour24 = 'yes'"> 
     7313        <xsl:value-of select="$hour"/><!-- 
     7314     --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> 
     7315      </xsl:when> 
     7316      <xsl:otherwise> 
     7317        <xsl:choose> 
     7318          <xsl:when test="$hour = 0">12</xsl:when> 
     7319          <xsl:when test="$hour &lt; 13"><xsl:value-of select="$hour"/></xsl:when> 
     7320          <xsl:otherwise><xsl:value-of select="$hour - 12"/></xsl:otherwise> 
     7321        </xsl:choose><!-- 
     7322     --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> 
     7323        <xsl:if test="$showAmPm = 'yes'"> 
     7324          <xsl:text> </xsl:text> 
     7325          <xsl:value-of select="$AmPm"/> 
     7326        </xsl:if> 
     7327      </xsl:otherwise> 
     7328    </xsl:choose> 
     7329  </xsl:template> 
     7330   
    71757331  <!-- search and replace template taken from 
    71767332       http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html -->