Make checkbox column narrow

git-svn-id: https://develop.svn.wordpress.org/trunk@6936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-20 09:29:27 +00:00
parent c644e7c0bc
commit 21b42e9577
8 changed files with 17 additions and 12 deletions

View File

@ -146,7 +146,7 @@ $messages[5] = __('Category not updated.');
<table class="widefat">
<thead>
<tr>
<th scope="col"><div style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></div></th>
<th scope="col" class="check-column"><div style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></div></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col"><?php _e('Description') ?></th>
<th scope="col" style="text-align: center"><?php _e('Posts') ?></th>

View File

@ -73,6 +73,11 @@ textarea, input, select {
text-align: left;
}
.widefat .check-column {
text-align: center;
width: 3%;
}
.widefat thead, .thead { background: #464646; color: #d7d7d7; }
.wrap {

View File

@ -94,7 +94,7 @@ if ( $page_links )
<table class="widefat">
<thead>
<tr>
<th scope="col" style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col"><?php _e('Description') ?></th>
<th scope="col" width="90" style="text-align: center"><?php _e('Links') ?></th>

View File

@ -33,7 +33,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
case 'cb':
?>
<th scope="row" style="text-align: center"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
<th scope="row" class="check-column"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
<?php
break;
case 'modified':

View File

@ -156,7 +156,7 @@ if ( $page_links )
<table class="widefat">
<thead>
<tr>
<th scope="col" style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col"><?php _e('Name') ?></th>
<th scope="col" width="90" style="text-align: center"><?php _e('Posts') ?></th>
</tr>

View File

@ -53,7 +53,7 @@ function _cat_row( $category, $level, $name_override = false ) {
$category->count = number_format_i18n( $category->count );
$posts_count = ( $category->count > 0 ) ? "<a href='edit.php?cat=$category->term_id'>$category->count</a>" : $category->count;
$output = "<tr id='cat-$category->term_id'$class>
<th scope='row' style='text-align: center'><input type='checkbox' name='delete[]' value='$category->term_id' /></th>
<th scope='row' class='check-column'><input type='checkbox' name='delete[]' value='$category->term_id' /></th>
<td>$edit</td>
<td>$category->description</td>
<td align='center'>$posts_count</td>\n\t</tr>\n";
@ -81,7 +81,7 @@ function link_cat_row( $category ) {
$category->count = number_format_i18n( $category->count );
$count = ( $category->count > 0 ) ? "<a href='link-manager.php?cat_id=$category->term_id'>$category->count</a>" : $category->count;
$output = "<tr id='link-cat-$category->term_id'$class>" .
'<td style="text-align: center"> <input type="checkbox" name="delete[]" value="' . $category->term_id . '" /></td>' .
'<th scope="row" class="check-column"> <input type="checkbox" name="delete[]" value="' . $category->term_id . '" /></th>' .
"<td>$edit</td>
<td>$category->description</td>
<td align='center'>$count</td>";
@ -234,7 +234,7 @@ function _tag_row( $tag, $class = '' ) {
$out = '';
$out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
$out .= '<td style="text-align: center"> <input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" /></td>';
$out .= '<th scope="row" class="check-column"> <input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" /></th>';
$out .= '<td><a href="edit-tags.php?action=edit&amp;tag_ID=' . $tag->term_id . '">' .
apply_filters( 'term_name', $tag->name ) . '</td>';
@ -368,7 +368,7 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
case 'cb':
?>
<th scope="row" style="text-align: center"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
<th scope="row" class="check-column"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
<?php
break;
case 'modified':
@ -550,7 +550,7 @@ function user_row( $user_object, $style = '', $role = '' ) {
}
$role_name = translate_with_context($wp_roles->role_names[$role]);
$r = "<tr id='user-$user_object->ID'$style>
<td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></td>
<th scope='row' class='check-column'><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></th>
<td><strong>$edit</strong></td>
<td>$user_object->first_name $user_object->last_name</td>
<td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td>

View File

@ -143,7 +143,7 @@ if ( $links ) {
<table class="widefat">
<thead>
<tr>
<th style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /></th>
<?php foreach($link_columns as $column_display_name) {
echo $column_display_name;
} ?>
@ -166,7 +166,7 @@ if ( $links ) {
++ $i;
$style = ($i % 2) ? '' : ' class="alternate"';
?><tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>><?php
echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>';
echo '<th scope="row" class="check-column"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></th>';
foreach($link_columns as $column_name=>$column_display_name) {
switch($column_name) {
case 'name':

View File

@ -325,7 +325,7 @@ unset($role_links);
<table class="widefat">
<tbody>
<tr class="thead">
<th><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /> </th>
<th scope="col" class="check-column"><input type="checkbox" onclick="checkAll(document.getElementById('posts-filter'));" /> </th>
<th><?php _e('Username') ?></th>
<th><?php _e('Name') ?></th>
<th><?php _e('E-mail') ?></th>