Changeset 1471

Show
Ignore:
Timestamp:
07/13/07 09:05:42
Author:
johnsa
Message:

user client: add some basic field focus on form loading

Files:

Legend:

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

    r1470 r1471  
    181181                          /bedework/page != 'attendeeReply'"> 
    182182            <xsl:attribute name="onload">checkStatus(<xsl:value-of select="/bedework/inboxState/numActive"/>,<xsl:value-of select="/bedework/inboxState/changed"/>,'<xsl:value-of select="$showInbox"/>')</xsl:attribute> 
     183          </xsl:when> 
     184        </xsl:choose> 
     185        <xsl:choose> 
     186          <xsl:when test="/bedework/page = 'addEvent'"> 
     187            <xsl:attribute name="onload">focusElement('bwEventTitle');</xsl:attribute> 
     188          </xsl:when> 
     189          <xsl:when test="/bedework/page = 'attendees'"> 
     190            <xsl:attribute name="onload">focusElement('bwRaUri');</xsl:attribute> 
     191          </xsl:when> 
     192          <xsl:when test="/bedework/page = 'modLocation'"> 
     193            <xsl:attribute name="onload">focusElement('bwLocMainAddress');</xsl:attribute> 
    183194          </xsl:when> 
    184195        </xsl:choose> 
     
    390401      <xsl:comment> 
    391402      <![CDATA[ 
     403      function checkStatus(inboxCount,changed,url) { 
    392404      // Check status of inbox and outbox and alert user appropriately. 
    393405      // Just take care of inbox for now. 
    394       function checkStatus(inboxCount,changed,url) { 
    395406        if (inboxCount && changed) { 
    396407          if (confirm("You have " + inboxCount + " pending meeting requests.\nGo to inbox?")) { 
     
    398409          } 
    399410        } 
     411      } 
     412      function focusElement(id) { 
     413      // focuses element by id 
     414        document.getElementById(id).focus(); 
    400415      } 
    401416      ]]> 
     
    21282143          <td class="fieldval"> 
    21292144            <xsl:variable name="title" select="form/title/input/@value"/> 
    2130             <input type="text" name="summary" size="80" value="{$title}"/> 
     2145            <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/> 
    21312146          </td> 
    21322147        </tr> 
     
    34693484        <div id="raContent"> 
    34703485          <div id="raFields"> 
    3471             <input name="uri" width="40"/> 
     3486            <input name="uri" width="40" id="bwRaUri"/> 
    34723487            <input type="submit" value="add" /> 
    34733488            &#160; 
     
    53835398              </td> 
    53845399              <td> 
    5385                 <input size="60" name="locationAddress.value" type="text"/> 
     5400                <input size="60" name="locationAddress.value" type="text" id="bwLocMainAddress"/> 
    53865401              </td> 
    53875402            </tr> 
     
    54285443              </td> 
    54295444              <td align="left"> 
    5430                 <input size="60" name="locationAddress.value" type="text"
     5445                <input size="60" name="locationAddress.value" type="text" id="bwLocMainAddress"
    54315446                  <xsl:attribute name="value"><xsl:value-of select="/bedework/currentLocation/address"/></xsl:attribute> 
    54325447                </input>