Fix plugin-install column hiding and widths. props PeteMall, fixes #16210.

git-svn-id: https://develop.svn.wordpress.org/trunk@17281 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-01-13 01:50:23 +00:00
parent 343b3c8a12
commit 4fcde740f1
4 changed files with 19 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -4169,12 +4169,17 @@ td.post-title p, td.plugin-title p {
border-radius: 6px;
}
.plugin-install #description, .plugin-install-network #description {
width: 60%;
}
table .vers,
table .column-visible,
table .column-rating {
text-align: center;
text-align: left;
}
/* Scrollbar fix for bulk upgrade iframe */
body.iframe {
height: 98%;

View File

@ -151,6 +151,13 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
'code' => array(), 'pre' => array(), 'em' => array(),'strong' => array(),
'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
);
list( $columns, $hidden ) = $this->get_column_info();
$style = array();
foreach ( $columns as $column_name => $column_display_name ) {
$style[ $column_name ] = in_array( $column_name, $hidden ) ? 'style="display:none;"' : '';
}
foreach ( (array) $this->items as $plugin ) {
if ( is_object( $plugin ) )
@ -205,11 +212,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
?>
<tr>
<td class="name"><strong><?php echo $title; ?></strong>
<td class="name column-name"<?php echo $style['name']; ?>><strong><?php echo $title; ?></strong>
<div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div>
</td>
<td class="vers"><?php echo $version; ?></td>
<td class="vers">
<td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
<td class="vers column-rating"<?php echo $style['rating']; ?>>
<div class="star-holder" title="<?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?>">
<div class="star star-rating" style="width: <?php echo esc_attr( $plugin['rating'] ) ?>px"></div>
<div class="star star5"><img src="<?php echo admin_url( 'images/star.gif' ); ?>" alt="<?php _e( '5 stars' ) ?>" /></div>
@ -219,7 +226,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
<div class="star star1"><img src="<?php echo admin_url( 'images/star.gif' ); ?>" alt="<?php _e( '1 star' ) ?>" /></div>
</div>
</td>
<td class="desc"><?php echo $description, $author; ?></td>
<td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
</tr>
<?php
}

View File

@ -482,7 +482,7 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110111' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110112' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );