Changeset 89

Show
Ignore:
Timestamp:
02/06/06 10:50:19
Author:
johnsa
Message:

added focusFirstElement() javascript function to admin stylsheet; focuses the first form element on page if a form exists.

Files:

Legend:

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

    r88 r89  
    135135        </xsl:if> 
    136136        <link rel="icon" type="image/ico" href="{$resourcesRoot}/bedework.ico" /> 
     137        <script language="JavaScript" type="text/javascript"> 
     138        <xsl:comment> 
     139        <![CDATA[ 
     140        // places the cursor in the first available form element when the page is loaded 
     141        // (if a form exists on the page) 
     142        function focusFirstElement() { 
     143          if (window.document.forms[0]) { 
     144            window.document.forms[0].elements[0].focus(); 
     145          } 
     146        }]]> 
     147        </xsl:comment> 
     148      </script> 
    137149      </head> 
    138       <body
     150      <body onLoad="focusFirstElement()"
    139151        <xsl:call-template name="header"/> 
    140152        <div id="content">