From 317219dafe98b70797ef853571c255de0654d4aa Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 02 Nov 2005 17:49:02 -0500
Subject: [PATCH] Added tab-index for compose form

---
 program/steps/mail/compose.inc       |    6 +++---
 skins/default/templates/compose.html |   14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index f707599..0dc4502 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -83,7 +83,7 @@
       // pass the following attributes to the form class
       $field_attrib = array('name' => '_from');
       foreach ($attrib as $attr => $value)
-        if (in_array($attr, array('id', 'class', 'style', 'size')))
+        if (in_array($attr, array('id', 'class', 'style', 'size', 'tabindex')))
           $field_attrib[$attr] = $value;
     
       // get this user's identities
@@ -146,14 +146,14 @@
       if (!$fname)
         $fname = '_bcc';
         
-      $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap');
+      $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap', 'tabindex');
       $field_type = 'textarea';            
       break;
 
     case 'replyto':
     case 'reply-to':
       $fname = '_replyto';
-      $allow_attrib = array('id', 'class', 'style', 'size');
+      $allow_attrib = array('id', 'class', 'style', 'size', 'tabindex');
       $field_type = 'textfield';
       break;
     
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 9dda5da..2071c0e 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -48,29 +48,29 @@
 <table border="0" cellspacing="0" cellpadding="1" id="compose-headers" summary=""><tr>
 
 <td class="title"><roundcube:label name="from" /></td>
-<td><roundcube:object name="composeHeaders" part="from" form="form" /></td>
+<td><roundcube:object name="composeHeaders" part="from" form="form" tabindex="1" /></td>
 
 </tr><tr>
 
 <td class="title top"><roundcube:label name="to" /></td>
-<td><roundcube:object name="composeHeaders" part="to" form="form" cols="80" rows="2" /></td>
+<td><roundcube:object name="composeHeaders" part="to" form="form" cols="80" rows="2" tabindex="2" /></td>
 <td class="add-button"><a href="#" onclick="return rcmail_toggle_display('compose-cc')">[Cc]</a><br />
 <a href="#" onclick="return rcmail_toggle_display('compose-bcc')">[Bcc]</a><br /></td>
 
 </tr><tr id="compose-cc">
 
 <td class="title top"><roundcube:label name="cc" /></td>
-<td><roundcube:object name="composeHeaders" part="cc" form="form" cols="80" rows="2" /></td>
+<td><roundcube:object name="composeHeaders" part="cc" form="form" cols="80" rows="2" tabindex="3" /></td>
 
 </tr><tr id="compose-bcc">
 
 <td class="title top"><roundcube:label name="bcc" /></td>
-<td><roundcube:object name="composeHeaders" part="bcc" form="form" cols="80" rows="2" /></td>
+<td><roundcube:object name="composeHeaders" part="bcc" form="form" cols="80" rows="2" tabindex="4" /></td>
 
 </tr><tr id="compose-replyto">
 
 <td class="title top"><roundcube:label name="replyto" /></td>
-<td><roundcube:object name="composeHeaders" part="replyto" form="form" size="80" /></td>
+<td><roundcube:object name="composeHeaders" part="replyto" form="form" size="80" tabindex="5" /></td>
 
 <!-- </tr><tr>
 
@@ -79,7 +79,7 @@
 </tr><tr>
 
 <td class="title"><roundcube:label name="subject" /></td>
-<td><roundcube:object name="composeSubject" id="compose-subject" form="form" /></td>
+<td><roundcube:object name="composeSubject" id="compose-subject" form="form" tabindex="6" /></td>
 
 </tr></table>
 
@@ -88,7 +88,7 @@
 </tr><tr>
 
 <td style="width:100%; height:100%; vertical-align:top;">
-<roundcube:object name="composeBody" id="compose-body" form="form" cols="80" rows="20" warp="virtual" />
+<roundcube:object name="composeBody" id="compose-body" form="form" cols="80" rows="20" warp="virtual" tabindex="7" />
 </td>
 
 </tr></table>

--
Gitblit v1.9.1