From c3155a54b2245cbe6d213338589e7f8fa1a0b9d1 Mon Sep 17 00:00:00 2001 From: westi Date: Tue, 11 Sep 2007 19:08:26 +0000 Subject: [PATCH] Fix tab order when edit comments. Props Nazgul fixes #4726 git-svn-id: http://svn.automattic.com/wordpress/trunk@6078 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-comment.php | 10 +++++----- wp-admin/includes/template.php | 18 +++++++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 5d5b73bdee..2f06909614 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -33,7 +33,7 @@ addLoadEvent(focusit);
- +
@@ -54,15 +54,15 @@ addLoadEvent(focusit); - + - + diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 45119b855e..cfbc293c5d 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -416,13 +416,17 @@ function meta_form() { } -function touch_time( $edit = 1, $for_post = 1 ) { +function touch_time( $edit = 1, $for_post = 1, $tab_index = 0 ) { global $wp_locale, $post, $comment; if ( $for_post ) $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; + + $tab_index_attribute = ''; + if ( (int) $tab_index > 0 ) + $tab_index_attribute = " tabindex=\"$tab_index\""; - echo '
'; + echo '
'; $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); $post_date = ($for_post) ? $post->post_date : $comment->comment_date; @@ -433,7 +437,7 @@ function touch_time( $edit = 1, $for_post = 1 ) { $mn = ($edit) ? mysql2date( 'i', $post_date ) : gmdate( 'i', $time_adj ); $ss = ($edit) ? mysql2date( 's', $post_date ) : gmdate( 's', $time_adj ); - echo "\n"; for ( $i = 1; $i < 13; $i = $i +1 ) { echo "\t\t\t
:   -   -   +   +
: