Validation fixes for post revisions. Props mdawaffe. see #6775

git-svn-id: http://svn.automattic.com/wordpress/trunk@8012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-29 23:16:11 +00:00
parent 0db872b5a1
commit 18fb540124
5 changed files with 19 additions and 6 deletions

View File

@ -2,7 +2,7 @@ a.page-numbers:hover {
border-color: #999;
}
body, .form-table pre {
body, .form-table .pre {
background-color: #fff;
color: #333;
}

View File

@ -2,7 +2,7 @@ a.page-numbers:hover {
border-color: #999;
}
body, .form-table pre {
body, .form-table .pre {
background-color: #fff;
color: #333;
}

View File

@ -146,7 +146,7 @@ require_once( 'admin-header.php' );
<th scope="col" class="th-full">
<span class="alignleft"><?php printf( __('Older: %s'), wp_post_revision_title( $left_revision ) ); ?></span>
<span class="alignright"><?php printf( __('Newer: %s'), wp_post_revision_title( $right_revision ) ); ?></span>
</td>
</th>
</tr>
<?php endif;
@ -167,7 +167,7 @@ foreach ( _wp_post_revision_fields() as $field => $field_title ) :
<tr id="revision-field-<?php echo $field; ?>">
<th scope="row"><?php echo wp_specialchars( $field_title ); ?></th>
<td><pre><?php echo $content; ?></pre></td>
<td><div class="pre"><?php echo $content; ?></div></td>
</tr>
<?php
@ -200,4 +200,10 @@ if ( !constant( 'WP_POST_REVISIONS' ) )
wp_list_post_revisions( $post, $args );
?>
</div>
<?php
require_once( 'admin-footer.php' );

View File

@ -927,9 +927,12 @@ html, body {
margin-right: 5px
}
.form-table pre {
.form-table .pre {
padding: 8px;
margin: 0;
}
.pre {
/* http://www.longren.org/2006/09/27/wrapping-text-inside-pre-tags/ */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */

View File

@ -677,7 +677,7 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) { // TODO? split i
$actions = '';
$rows .= "<tr$class>\n";
$rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked /><input type='radio' name='right' value='$revision->ID'$right_checked />\n";
$rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked /><input type='radio' name='right' value='$revision->ID'$right_checked /></th>\n";
$rows .= "\t<td>$date</td>\n";
$rows .= "\t<td>$name</td>\n";
$rows .= "\t<td class='action-links'>$actions</td>\n";
@ -707,10 +707,12 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) { // TODO? split i
<col style="width: 33%" />
<col style="width: 33%" />
<thead>
<tr>
<th scope="col"></th>
<th scope="col"><?php _e( 'Date Created' ); ?></th>
<th scope="col"><?php _e( 'Author' ); ?></th>
<th scope="col" class="action-links"><?php _e( 'Actions' ); ?></th>
</tr>
</thead>
<tbody>
@ -719,6 +721,8 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) { // TODO? split i
</tbody>
</table>
</form>
<?php
else :
echo "<ul class='post-revisions'>\n";