Some more styling for the plugins screen

git-svn-id: https://develop.svn.wordpress.org/trunk@11391 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-05-19 01:27:34 +00:00
parent d044913a4e
commit 846cdf43c9
6 changed files with 91 additions and 28 deletions

View File

@ -382,7 +382,9 @@ div.dashboard-widget-submit input:hover,
color: #ccc; color: #ccc;
} }
.submitbox .submitdelete, a.delete { .plugins a.delete:hover,
.submitbox .submitdelete,
a.delete {
color: #f00; color: #f00;
border-bottom-color: #f00; border-bottom-color: #f00;
} }
@ -418,7 +420,8 @@ div.dashboard-widget-submit input:hover,
.updated, .updated,
.login #login_error, .login #login_error,
.login .message { .login .message,
.update-message {
background-color: #ffffe0; background-color: #ffffe0;
border-color: #e6db55; border-color: #e6db55;
} }
@ -465,7 +468,8 @@ a,
#the-comment-list p.comment-author strong a, #the-comment-list p.comment-author strong a,
#media-upload a.del-link, #media-upload a.del-link,
#media-upload a.delete, #media-upload a.delete,
.ui-tabs-nav a { .ui-tabs-nav a,
.plugins a.delete {
color: #1c6280; color: #1c6280;
} }
@ -574,10 +578,17 @@ input.readonly, textarea.readonly {
background-color: #fff; background-color: #fff;
} }
#all-plugins-table .inactive,
#all-plugins-table .inactive th,
#all-plugins-table .inactive td {
color: #777;
}
.plugins .active, .plugins .active,
.plugins .active th, .plugins .active th,
.plugins .active td { .plugins .active td {
background-color: #e7f7d3; color: #000;
background-color: #f5f5f5;
} }
#the-comment-list .unapproved, #the-comment-list .unapproved,

View File

@ -378,7 +378,9 @@ div.dashboard-widget-submit input:hover,
color: #ccc; color: #ccc;
} }
.submitbox .submitdelete, a.delete { .plugins a.delete:hover,
.submitbox .submitdelete,
a.delete {
color: #f00; color: #f00;
border-bottom-color: #f00; border-bottom-color: #f00;
} }
@ -414,7 +416,8 @@ div.dashboard-widget-submit input:hover,
.updated, .updated,
.login #login_error, .login #login_error,
.login .message { .login .message,
.update-message {
background-color: #ffffe0; background-color: #ffffe0;
border-color: #e6db55; border-color: #e6db55;
} }
@ -461,7 +464,8 @@ a,
#the-comment-list p.comment-author strong a, #the-comment-list p.comment-author strong a,
#media-upload a.del-link, #media-upload a.del-link,
#media-upload a.delete, #media-upload a.delete,
.ui-tabs-nav a { .ui-tabs-nav a,
.plugins a.delete {
color: #21759b; color: #21759b;
} }
@ -569,10 +573,17 @@ input.readonly, textarea.readonly {
background-color: #fff; background-color: #fff;
} }
#all-plugins-table .inactive,
#all-plugins-table .inactive th,
#all-plugins-table .inactive td {
color: #777;
}
.plugins .active, .plugins .active,
.plugins .active th, .plugins .active th,
.plugins .active td { .plugins .active td {
background-color: #e7f7d3; color: #000;
background-color: #f5f5f5;
} }
#the-comment-list .unapproved, #the-comment-list .unapproved,

View File

@ -157,7 +157,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
$details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800'); $details_url = admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&TB_iframe=true&width=600&height=800');
echo '<tr><td colspan="5" class="plugin-update">'; echo '<tr><td colspan="3" class="plugin-update"><div class="update-message">';
if ( ! current_user_can('update_plugins') ) if ( ! current_user_can('update_plugins') )
printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s Details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
else if ( empty($r->package) ) else if ( empty($r->package) )
@ -167,7 +167,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
do_action( "in_plugin_update_message-$file", $plugin_data, $r ); do_action( "in_plugin_update_message-$file", $plugin_data, $r );
echo '</td></tr>'; echo '</div></td></tr>';
} }
add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 );

View File

@ -354,7 +354,7 @@ function print_plugins_table($plugins, $context = '') {
if ( empty($plugins) ) { if ( empty($plugins) ) {
echo '<tr> echo '<tr>
<td colspan="6">' . __('No plugins to show') . '</td> <td colspan="3">' . __('No plugins to show') . '</td>
</tr>'; </tr>';
} }
foreach ( (array)$plugins as $plugin_file => $plugin_data) { foreach ( (array)$plugins as $plugin_file => $plugin_data) {
@ -379,7 +379,17 @@ function print_plugins_table($plugins, $context = '') {
echo " echo "
<tr class='$class'> <tr class='$class'>
<th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th> <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th>
<td class='plugin-title'><strong>{$plugin_data['Name']}</strong>"; <td class='plugin-title'><strong>{$plugin_data['Name']}</strong></td>
<td class='desc'><p>{$plugin_data['Description']}</p></td>
</tr>\n";
do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $context );
echo "
<tr class='$class second'>
<td></td>
<td class='plugin-title'>";
$i = 0; $i = 0;
echo '<div class="row-actions-visible">'; echo '<div class="row-actions-visible">';
foreach ( $actions as $action => $link ) { foreach ( $actions as $action => $link ) {
@ -387,9 +397,8 @@ function print_plugins_table($plugins, $context = '') {
( $i == $action_count ) ? $sep = '' : $sep = ' | '; ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
echo "<span class='$action'>$link$sep</span>"; echo "<span class='$action'>$link$sep</span>";
} }
echo '</div>'; echo "</div></td>
echo "</td> <td class='desc'>";
<td class='desc'><p>{$plugin_data['Description']}</p>";
$plugin_meta = array(); $plugin_meta = array();
if ( !empty($plugin_data['Version']) ) if ( !empty($plugin_data['Version']) )
$plugin_meta[] = sprintf(__('Version %s'), $plugin_data['Version']); $plugin_meta[] = sprintf(__('Version %s'), $plugin_data['Version']);
@ -404,11 +413,8 @@ function print_plugins_table($plugins, $context = '') {
} }
$plugin_meta = apply_filters('plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $context); $plugin_meta = apply_filters('plugin_row_meta', $plugin_meta, $plugin_file, $plugin_data, $context);
echo implode(' | ', $plugin_meta); echo implode(' | ', $plugin_meta);
echo "</p>"; echo "</p></td>
echo '</td> </tr>\n";
</tr>';
do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $context );
} }
?> ?>
</tbody> </tbody>

View File

@ -43,7 +43,7 @@ select option {
} }
.plugins .desc p { .plugins .desc p {
margin: 0 0 10px; margin: 0 0 8px;
} }
.plugins td.desc { .plugins td.desc {
@ -63,6 +63,27 @@ select option {
white-space: nowrap; white-space: nowrap;
} }
.plugins .row-actions-visible {
padding: 0;
}
.widefat tbody.plugins th.check-column {
padding: 7px 0;
}
.plugins td,
.plugins th {
border-bottom: 0 none;
padding: 4px 7px 0;
}
.plugins .second td,
.plugins .second th {
border-bottom-style: solid;
border-bottom-width: 1px;
padding: 0 7px 4px;
}
.import-system { .import-system {
font-size: 16px; font-size: 16px;
} }
@ -750,8 +771,7 @@ td.media-icon img {
max-height: 60px; max-height: 60px;
} }
#update-nag, #update-nag {
.plugin-update {
line-height: 29px; line-height: 29px;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
@ -762,9 +782,23 @@ td.media-icon img {
border-style: solid none; border-style: solid none;
} }
.plugin-update { .plugins .plugin-update {
border-width: 0 0 1px; text-align: center;
border-style: none none solid; padding: 0;
}
.plugin-update .update-message {
padding: 3px 7px;
margin: 2px 20px 10px;
}
.update-message {
border-width: 1px;
border-style: solid;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
} }
#update-nag a, #update-nag a,
@ -794,6 +828,7 @@ div.comment-item:hover .row-actions {
.row-actions-visible { .row-actions-visible {
padding: 2px 0 0; padding: 2px 0 0;
cursor: pointer;
} }
/* Admin Header */ /* Admin Header */

View File

@ -414,14 +414,14 @@ function wp_default_styles( &$styles ) {
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' ); $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090514' ); $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090518' );
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090514' ); $styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090514' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' ); $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string. // Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
$styles->add( 'colors', true, array(), '20090514' ); $styles->add( 'colors', true, array(), '20090518' );
$styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20090514'); // for login.php. Is there a better way? $styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20090514'); // for login.php. Is there a better way?
$styles->add_data( 'colors-fresh', 'rtl', true ); $styles->add_data( 'colors-fresh', 'rtl', true );
$styles->add( 'colors-classic', '/wp-admin/css/colors-classic.css', array(), '20090514'); $styles->add( 'colors-classic', '/wp-admin/css/colors-classic.css', array(), '20090514');