Responsive themes screen, props helenyhou, see #18198

git-svn-id: http://svn.automattic.com/wordpress/trunk@18673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-09-15 04:26:26 +00:00
parent 64e98fd257
commit bff7722dd1
5 changed files with 41 additions and 104 deletions

File diff suppressed because one or more lines are too long

View File

@ -2363,6 +2363,10 @@ th.asc:hover span.sorting-indicator {
vertical-align: middle;
}
.tablenav.themes {
max-width: 98%;
}
.tablenav .tablenav-pages {
float: right;
display: block;
@ -3539,6 +3543,7 @@ p.popular-tags {
border-width: 1px;
border-style: solid;
line-height: 2em;
max-width: 1000px;
padding: 8px 12px 12px;
text-align: justify;
}
@ -4335,40 +4340,14 @@ span.imgedit-scale-warn {
height:auto;
}
table#availablethemes {
border-spacing: 0;
border-width: 1px 0;
border-style: solid none;
margin: 10px auto;
width: 100%;
}
table#availablethemes .no-items td{
border-width:0;
padding:5px;
}
td.available-theme {
.available-theme {
display: inline-block;
margin-bottom: 10px;
margin-right: 25px;
overflow: hidden;
padding: 20px;
vertical-align: top;
width: 240px;
margin: 0;
padding: 20px;
text-align: left;
}
table#availablethemes td {
border-width: 0 1px 1px;
border-style: none solid solid;
}
table#availablethemes td.right,
table#availablethemes td.left {
border-right: 0 none;
border-left: 0 none;
}
table#availablethemes td.bottom {
border-bottom: 0 none;
}
.available-theme a.screenshot {
@ -7235,14 +7214,11 @@ body#theme-information {
.feature-filter .feature-group {
float: left;
margin-bottom: 20px;
width: 725px;
margin: 5px 10px 10px;
}
.feature-filter .feature-name {
float: left;
text-align: right;
width: 95px;
font-weight: bold;
}
.feature-filter .feature-group li {
@ -7250,7 +7226,7 @@ body#theme-information {
float: left;
list-style-type: none;
padding-right: 25px;
min-width: 145px;
min-width: 150px;
}
.feature-container {
@ -7259,11 +7235,6 @@ overflow: auto;
margin-bottom: 10px;
}
.feature-group {
margin-bottom: 0px !important;
}

View File

@ -22,7 +22,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
$paged = $this->get_pagenum();
$per_page = 30;
$per_page = 36;
// These are the tabs which are shown on the page,
$tabs = array();
@ -130,7 +130,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
// wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
?>
<div class="tablenav top">
<div class="tablenav top themes">
<div class="alignleft actions">
<?php do_action( 'install_themes_table_header' ); ?>
</div>
@ -139,13 +139,11 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
<br class="clear" />
</div>
<table id="availablethemes" cellspacing="0" cellpadding="0">
<tbody id="the-list" class="list:themes">
<?php $this->display_rows_or_placeholder(); ?>
</tbody>
</table>
<div id="availablethemes">
<?php $this->display_rows_or_placeholder(); ?>
</div>
<div class="tablenav bottom">
<div class="tablenav bottom themes">
<?php $this->pagination( 'bottom' ); ?>
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
<br class="clear" />
@ -155,30 +153,16 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
function display_rows() {
$themes = $this->items;
$theme_names = array_keys( $themes );
$rows = ceil( count( $themes ) / 3 );
$table = array();
$theme_keys = array_keys( $themes );
for ( $row = 1; $row <= $rows; $row++ )
for ( $col = 1; $col <= 3; $col++ )
$table[$row][$col] = array_shift( $theme_keys );
foreach ( $table as $row => $cols ) {
echo "\t<tr>\n";
foreach ( $cols as $col => $theme_index ) {
foreach ( $theme_names as $theme_name ) {
$class = array( 'available-theme' );
if ( $row == 1 ) $class[] = 'top';
if ( $col == 1 ) $class[] = 'left';
if ( $row == $rows ) $class[] = 'bottom';
if ( $col == 3 ) $class[] = 'right';
?>
<td class="<?php echo join( ' ', $class ); ?>"><?php
if ( isset( $themes[$theme_index] ) )
display_theme( $themes[$theme_index] );
?></td>
<?php } // end foreach $cols
echo "\t</tr>\n";
} // end foreach $table
<div class="<?php echo join( ' ', $class ); ?>"><?php
if ( isset( $themes[$theme_name] ) )
display_theme( $themes[$theme_name] );
?></div>
<?php } // end foreach $theme_names
}
}

View File

@ -47,7 +47,7 @@ class WP_Themes_List_Table extends WP_List_Table {
unset( $themes[$ct->name] );
uksort( $themes, "strnatcasecmp" );
$per_page = 15;
$per_page = 24;
$page = $this->get_pagenum();
$start = ( $page - 1 ) * $per_page;
@ -92,7 +92,7 @@ class WP_Themes_List_Table extends WP_List_Table {
if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
return;
?>
<div class="tablenav <?php echo $which; ?>">
<div class="tablenav themes <?php echo $which; ?>">
<?php $this->pagination( $which ); ?>
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
<br class="clear" />
@ -105,11 +105,9 @@ class WP_Themes_List_Table extends WP_List_Table {
?>
<?php $this->tablenav( 'top' ); ?>
<table id="availablethemes" cellspacing="0" cellpadding="0">
<tbody id="the-list" class="list:themes">
<?php $this->display_rows_or_placeholder(); ?>
</tbody>
</table>
<div id="availablethemes">
<?php $this->display_rows_or_placeholder(); ?>
</div>
<?php $this->tablenav( 'bottom' ); ?>
<?php
@ -124,25 +122,11 @@ class WP_Themes_List_Table extends WP_List_Table {
$theme_names = array_keys( $themes );
natcasesort( $theme_names );
$table = array();
$rows = ceil( count( $theme_names ) / 3 );
for ( $row = 1; $row <= $rows; $row++ )
for ( $col = 1; $col <= 3; $col++ )
$table[$row][$col] = array_shift( $theme_names );
foreach ( $table as $row => $cols ) {
?>
<tr>
<?php
foreach ( $cols as $col => $theme_name ) {
$class = array( 'available-theme' );
if ( $row == 1 ) $class[] = 'top';
if ( $col == 1 ) $class[] = 'left';
if ( $row == $rows ) $class[] = 'bottom';
if ( $col == 3 ) $class[] = 'right';
?>
<td class="<?php echo join( ' ', $class ); ?>">
<?php if ( !empty( $theme_name ) ) :
foreach ( $theme_names as $theme_name ) {
$class = array( 'available-theme' );
?>
<div class="<?php echo join( ' ', $class ); ?>">
<?php if ( !empty( $theme_name ) ) :
$template = $themes[$theme_name]['Template'];
$stylesheet = $themes[$theme_name]['Stylesheet'];
$title = $themes[$theme_name]['Title'];
@ -194,10 +178,8 @@ foreach ( $cols as $col => $theme_name ) {
<?php endif; ?>
<?php theme_update_available( $themes[$theme_name] ); ?>
<?php endif; // end if not empty theme_name ?>
</td>
<?php } // end foreach $cols ?>
</tr>
<?php } // end foreach $table
</div>
<?php } // end foreach $theme_names
}
function search_theme( $theme ) {

View File

@ -402,7 +402,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(), '20110914b' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110914c' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array('wp-admin'), '20110902' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );