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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-01-13 01:50:23 +00:00
parent d8c6938af1
commit 519449a9f9
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; border-radius: 6px;
} }
.plugin-install #description, .plugin-install-network #description {
width: 60%;
}
table .vers, table .vers,
table .column-visible, table .column-visible,
table .column-rating { table .column-rating {
text-align: center; text-align: left;
} }
/* Scrollbar fix for bulk upgrade iframe */ /* Scrollbar fix for bulk upgrade iframe */
body.iframe { body.iframe {
height: 98%; height: 98%;

View File

@ -152,6 +152,13 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => 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 ) { foreach ( (array) $this->items as $plugin ) {
if ( is_object( $plugin ) ) if ( is_object( $plugin ) )
$plugin = (array) $plugin; $plugin = (array) $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 ); $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
?> ?>
<tr> <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> <div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div>
</td> </td>
<td class="vers"><?php echo $version; ?></td> <td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
<td class="vers"> <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-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 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> <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 class="star star1"><img src="<?php echo admin_url( 'images/star.gif' ); ?>" alt="<?php _e( '1 star' ) ?>" /></div>
</div> </div>
</td> </td>
<td class="desc"><?php echo $description, $author; ?></td> <td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
</tr> </tr>
<?php <?php
} }

View File

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