Changeset 2045

Show
Ignore:
Timestamp:
01/27/09 17:02:50
Author:
johnsa
Message:

user client: updating attendee lookup to use vcard json object

Files:

Legend:

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

    r1990 r2045  
    15021502} 
    15031503#bedework #tasks .taskDate { 
    1504   font-size: 0.7em; 
    1505   margin-left: 1em
     1504  font-size: 0.8em; 
     1505  font-style: italic
    15061506} 
    15071507/* Calendars and Subscriptions */ 
     
    16561656  padding: 0; 
    16571657  margin: 0; 
    1658   width: 2em
     1658  width: 2em !important
    16591659  height: 10px; 
    16601660} 
     
    19131913  font-size: 0.9em; 
    19141914} 
    1915 /*   LINKS    */ 
    19161915#bedework a:link, 
    19171916#bedework a:active { 
     
    19461945  float: left; 
    19471946} 
     1947#bedework .titleButton { 
     1948  display: block; 
     1949  margin: 1em; 
     1950} 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r2019 r2045  
    974974        </xsl:when> 
    975975        <xsl:otherwise> 
    976           <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event[not(entityType=2 and start/noStart='true' and end/type='N')]]"> 
    977           <!-- reminders are displayed below the normal event listings and are represented as 
     976          <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event[not(entityType=2)]]"> 
     977          <!-- tasks (entityType=2) are displayed below the normal event listings.  Reminders (tasks without 
     978               start or end dates) can also be represented as: 
    978979               entityType=2 and start/noStart='true' and end/type='N'; we skip them within grid and list views --> 
    979980            <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
     
    997998              </tr> 
    998999            </xsl:if> 
    999             <xsl:for-each select="event[not(entityType=2 and start/noStart='true' and end/type='N')]"> 
     1000            <xsl:for-each select="event[not(entityType=2)]"> 
    10001001              <xsl:variable name="id" select="id"/> 
    10011002              <xsl:variable name="subscriptionId" select="subscription/id"/> 
     
    12441245              <xsl:if test="event"> 
    12451246                <ul> 
    1246                   <xsl:apply-templates select="event[not(entityType=2 and start/noStart='true' and end/type='N')]" mode="calendarLayout"> 
     1247                  <xsl:apply-templates select="event[not(entityType=2)]" mode="calendarLayout"> 
    12471248                    <xsl:with-param name="dayPos" select="$dayPos"/> 
    12481249                  </xsl:apply-templates> 
     
    12941295                  <xsl:if test="event"> 
    12951296                    <ul> 
    1296                       <xsl:apply-templates select="event[not(entityType=2 and start/noStart='true' and end/type='N')]" mode="calendarLayout"> 
     1297                      <xsl:apply-templates select="event[not(entityType=2)]" mode="calendarLayout"> 
    12971298                        <xsl:with-param name="dayPos" select="$dayPos"/> 
    12981299                      </xsl:apply-templates> 
     
    15051506  <!--== TASKS ==--> 
    15061507  <xsl:template name="tasks"> 
    1507     <xsl:if test="/bedework/eventscalendar//event[entityType=2 and start/noStart='true' and end/type='N']"> 
     1508    <xsl:if test="/bedework/eventscalendar//event[entityType=2]"> 
    15081509      <div id="tasks"> 
    15091510        <h3> 
    1510           reminders (tasks with no start or end date) 
     1511          tasks &amp; reminders 
    15111512        </h3> 
    15121513        <ul class="tasks"> 
    1513           <xsl:apply-templates select="/bedework/eventscalendar//event[entityType=2 and start/noStart='true' and end/type='N']" mode="tasks"/> 
     1514          <xsl:apply-templates select="/bedework/eventscalendar//event[entityType=2]" mode="tasks"/> 
    15141515        </ul> 
    15151516      </div> 
     
    15311532          <xsl:otherwise> 
    15321533            <xsl:value-of select="summary"/> 
     1534            <xsl:if test="not(start/noStart='true')"> 
     1535              <span class="taskDate"> - Start: <xsl:value-of select="start/shortdate"/></span> 
     1536            </xsl:if> 
     1537            <xsl:if test="not(end/type='N')"> 
     1538              <span class="taskDate">- Due: <xsl:value-of select="end/shortdate"/></span> 
     1539            </xsl:if> 
    15331540          </xsl:otherwise> 
    15341541        </xsl:choose> 
     
    37743781      <table id="freeBusy"> 
    37753782        <tr> 
    3776           <td></td> 
    3777           <th colspan="24" class="left"> 
     3783          <td>&#160;</td> 
     3784          <td colspan="24" class="left"> 
    37783785            Freebusy for 
    37793786            <span class="who"> 
     
    37903797              </xsl:choose> 
    37913798            </span> 
    3792           </th
     3799          </td
    37933800          <!-- at some point allow switching of timezones: 
    3794           <th colspan="32" class="right"> 
     3801          <td colspan="24" class="right"> 
    37953802            <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> 
    37963803            <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> 
     
    38043811              </xsl:for-each> 
    38053812            </select> 
    3806           </th>--> 
     3813          </td>--> 
    38073814        </tr> 
    38083815        <tr> 
     
    41074114      </li> 
    41084115    </ul> 
    4109     <h2> 
    4110       Manage Categories 
    4111       <input type="button" name="return" value="Add new category" onclick="javascript:location.replace('{$category-initAdd}')" class="titleButton"/> 
    4112     </h2> 
    41134116    <table class="common" id="manage" cellspacing="0"> 
    41144117      <tr> 
    4115         <th class="commonHeader" colspan="2">Edit/Delete Categories</th> 
     4118        <th class="commonHeader">Manage Categories</th> 
    41164119      </tr> 
    4117       <xsl:choose
    4118         <xsl:when test="/bedework/categories/category"
    4119           <xsl:for-each select="/bedework/categories/category"
    4120             <xsl:variable name="categoryKey" select="normalize-space(keyword)"/
    4121             <tr
    4122               <td
    4123                 <a href="{$category-fetchForUpdate}&amp;categoryKey={$categoryKey}"> 
    4124                   <xsl:value-of select="keyword"/> 
    4125                 </a
    4126               </td
    4127               <td
    4128                 <xsl:value-of select="desc"/
    4129               </td
    4130             </tr
    4131           </xsl:for-each
    4132         </xsl:when
    4133         <xsl:otherwise
    4134           <tr> 
    4135             <td colspan="2"
    4136               No categories defined 
    4137             </td
    4138           </tr
    4139         </xsl:otherwise
    4140       </xsl:choose
     4120      <tr
     4121        <td
     4122          <input type="button" name="return" value="Add new category" onclick="javascript:location.replace('{$category-initAdd}')" class="titleButton"/
     4123          <ul
     4124            <xsl:choose
     4125              <xsl:when test="/bedework/categories/category"
     4126                <xsl:for-each select="/bedework/categories/category"> 
     4127                  <xsl:variable name="categoryKey" select="normalize-space(keyword)"/> 
     4128                  <li
     4129                    <a href="{$category-fetchForUpdate}&amp;categoryKey={$categoryKey}"
     4130                      <xsl:value-of select="keyword"/
     4131                    </a
     4132                  </li
     4133                </xsl:for-each
     4134              </xsl:when
     4135              <xsl:otherwise
     4136                <li
     4137                  No categories defined 
     4138                </li
     4139              </xsl:otherwise> 
     4140            </xsl:choose
     4141          </ul
     4142        </td
     4143      </tr
    41414144    </table> 
    41424145  </xsl:template> 
    41434146 
    41444147  <xsl:template name="modCategory"> 
     4148    <h2>Manage Preferences</h2> 
     4149    <ul class="submenu"> 
     4150      <li> 
     4151        <a href="{$prefs-fetchForUpdate}">general</a> 
     4152      </li> 
     4153      <li class="selected">categories</li> 
     4154      <li> 
     4155        <a href="{$location-initUpdate}">locations</a> 
     4156      </li> 
     4157      <li> 
     4158        <a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a> 
     4159      </li> 
     4160    </ul> 
    41454161    <xsl:choose> 
    41464162      <xsl:when test="/bedework/creating='true'"> 
    4147         <h2>Manage Categories</h2> 
    41484163        <form action="{$category-update}" method="post"> 
    41494164          <table class="common" cellspacing="0"> 
     
    41814196      </xsl:when> 
    41824197      <xsl:otherwise> 
    4183         <h2>Manage Categories</h2> 
    41844198        <form action="{$category-update}" method="post"> 
    41854199          <table class="common" cellspacing="0"> 
    41864200            <tr> 
    4187               <th class="commonHeader" colspan="2">Update Category</th> 
     4201              <th class="commonHeader" colspan="2">Edit Category</th> 
    41884202            </tr> 
    41894203            <tr> 
     
    58145828  <xsl:template name="locationList"> 
    58155829    <h2> 
    5816       Manage Locations 
    5817       <input type="button" name="return" value="Add new location" onclick="javascript:location.replace('{$location-initAdd}')" class="titleButton"/> 
     5830      Manage Preferences 
    58185831    </h2> 
     5832    <ul class="submenu"> 
     5833      <li> 
     5834        <a href="{$prefs-fetchForUpdate}">general</a> 
     5835      </li> 
     5836      <li> 
     5837        <a href="{$category-initUpdate}">categories</a> 
     5838      </li> 
     5839      <li class="selected">locations</li> 
     5840      <li> 
     5841        <a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a> 
     5842      </li> 
     5843    </ul> 
    58195844    <table class="common" id="manage" cellspacing="0"> 
    58205845      <tr> 
    5821         <th class="commonHeader">Edit/Delete Locations</th> 
     5846        <th class="commonHeader">Manage Locations</th> 
    58225847      </tr> 
    58235848      <tr> 
    58245849        <td> 
     5850          <input type="button" name="return" value="Add new location" onclick="javascript:location.replace('{$location-initAdd}')" class="titleButton"/> 
    58255851          <xsl:if test="/bedework/locations/location"> 
    58265852            <ul> 
     
    58405866 
    58415867  <xsl:template name="modLocation"> 
     5868    <h2> 
     5869      Manage Preferences 
     5870    </h2> 
     5871    <ul class="submenu"> 
     5872      <li> 
     5873        <a href="{$prefs-fetchForUpdate}">general</a> 
     5874      </li> 
     5875      <li> 
     5876        <a href="{$category-initUpdate}">categories</a> 
     5877      </li> 
     5878      <li class="selected"> 
     5879        <a href="{$location-initUpdate}">locations</a> 
     5880      </li> 
     5881      <li> 
     5882        <a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a> 
     5883      </li> 
     5884    </ul> 
    58425885    <xsl:choose> 
    58435886      <xsl:when test="/bedework/creating = 'true'"> 
    58445887        <form name="addLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    5845           <h2>Manage Locations</h2> 
    58465888          <table class="common" cellspacing="0"> 
    58475889            <tr> 
     
    58865928        <form name="editLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    58875929          <input type="hidden" name="updateLocation" value="true"/> 
    5888           <h2>Manage Locations</h2> 
    58895930          <table class="common" cellspacing="0"> 
    58905931            <tr> 
  • trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkAttendees.js

    r1955 r2045  
    1 var entries = [ 
     1/*var entries = [ 
    22  { name: "Peter Pan", address: "peter@pan.de", uri: "someUri", type: "user"}, 
    33  { name: "Molly", address: "molly@yahoo.com", uri: "someUri", type: "user"}, 
     
    1010  { name: "Quake The Net", address: "webmaster@quakenet.org", uri: "someUri", type: "user"}, 
    1111  { name: "Dr. Write", address: "write@writable.com", uri: "someUri", type: "user"} 
    12 ]; 
     12];*/ 
     13 
     14var entries = { 
     15  "microformats": { 
     16    "vcard": [ 
     17    { 
     18      "version": { 
     19        "value": "4.0" 
     20      }, 
     21 
     22      "rev": { 
     23        "value": "20080811051937Z" 
     24      }, 
     25 
     26      "source": [{ 
     27        "value": "\/ucarddav\/douglm.vcf" 
     28      }], 
     29      "uid": { 
     30        "value": "\/ucarddav\/douglm.vcf" 
     31      }, 
     32      "mail": [{ 
     33        "value": "douglm@mysite.org" 
     34      }], 
     35 
     36      "kind": { 
     37        "value": "individual" 
     38      }, 
     39 
     40      "fn": { 
     41        "value": "Douglass, Mike" 
     42      } 
     43 
     44    }, { 
     45      "version": { 
     46        "value": "4.0" 
     47      }, 
     48 
     49      "rev": { 
     50        "value": "20080812153529Z" 
     51      }, 
     52 
     53      "source": [{ 
     54        "value": "\/ucarddav\/johnsa.vcf" 
     55      }], 
     56      "uid": { 
     57        "value": "\/ucarddav\/johnsa.vcf" 
     58      }, 
     59 
     60      "mail": [{ 
     61        "value": "johnsa@rpi.edu", 
     62        "value": "johnsa@mysite.org" 
     63      }], 
     64 
     65      "kind": { 
     66        "value": "individual" 
     67      }, 
     68 
     69      "fn": { 
     70        "value": "Johnson, Arlen" 
     71      } 
     72 
     73    }, { 
     74      "version": { 
     75        "value": "4.0" 
     76      }, 
     77 
     78      "rev": { 
     79        "value": "20081103181729Z" 
     80      }, 
     81 
     82      "source": [{ 
     83        "value": "\/ucarddav\/calowner01.vcf" 
     84      }], 
     85      "uid": { 
     86        "value": "\/ucarddav\/calowner01.vcf" 
     87      }, 
     88 
     89      "mail": [{ 
     90        "value": "bogus@mysite.org" 
     91      }], 
     92 
     93      "kind": { 
     94        "value": "individual" 
     95      }, 
     96 
     97      "fn": { 
     98        "value": "last, first" 
     99      } 
     100 
     101    }] 
     102  } 
     103
     104 
     105 
    13106 
    14107$(document).ready(function(){ 
     
    28121    autoFill: false, 
    29122    formatItem: function(row, i, max) { 
    30       return " \"" + row.name + "\" [" + row.address + "]"; 
     123      return " \"" + row.fn + "\" [" + row.mail + "]"; 
    31124    }, 
    32125    formatMatch: function(row, i, max) { 
    33       return row.name + " " + row.address
     126      return row.fn + " " + row.mail
    34127    }, 
    35128    formatResult: function(row) { 
    36       return row.address
     129      return row.mail
    37130    } 
    38131  });