responsive orders table and adds .shop_table_responsive. closes #5121

This commit is contained in:
James Koster 2014-10-02 20:44:38 +01:00
parent 0c11534716
commit 0fa63d6da0
4 changed files with 59 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,6 +6,58 @@
.woocommerce, .woocommerce-page {
table.shop_table_responsive {
thead {
display: none;
}
tbody {
tr:first-child {
td:first-child {
border-top: 0;
}
}
}
tr {
display: block;
td {
display: block;
&:before {
content: attr(data-title) ':';
font-weight: 700;
}
}
&:nth-child(2n) {
td {
background-color: rgba(0,0,0,0.025);
}
}
}
}
table.my_account_orders {
tr {
td {
&.order-actions {
text-align: left;
&:before {
display: none;
}
.button {
float: none;
margin: .125em .25em .125em 0;
}
}
}
}
}
/**
* General layout
*/

View File

@ -139,6 +139,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - When user tries to download a file and isn't logged in, send them to the account page with a notice.
* Tweak - Logic in wc_paying_customer to only increase for 'simple' orders.
* Tweak - Added tool to refresh stats to customer list.
* Tweak - Recent order table on my account is responsive.
= 2.2.5 =
* Fix - Filters in admin screen for coupons and orders.

View File

@ -25,7 +25,7 @@ if ( $customer_orders ) : ?>
<h2><?php echo apply_filters( 'woocommerce_my_account_my_orders_title', __( 'Recent Orders', 'woocommerce' ) ); ?></h2>
<table class="shop_table my_account_orders">
<table class="shop_table shop_table_responsive my_account_orders">
<thead>
<tr>
@ -44,18 +44,18 @@ if ( $customer_orders ) : ?>
$item_count = $order->get_item_count();
?><tr class="order">
<td class="order-number">
<td class="order-number" data-title="<?php _e( 'Order', 'woocommerce' ); ?>">
<a href="<?php echo $order->get_view_order_url(); ?>">
<?php echo $order->get_order_number(); ?>
</a>
</td>
<td class="order-date">
<td class="order-date" data-title="<?php _e( 'Date', 'woocommerce' ); ?>">
<time datetime="<?php echo date( 'Y-m-d', strtotime( $order->order_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->order_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></time>
</td>
<td class="order-status" style="text-align:left; white-space:nowrap;">
<td class="order-status" data-title="<?php _e( 'Status', 'woocommerce' ); ?>" style="text-align:left; white-space:nowrap;">
<?php echo wc_get_order_status_name( $order->get_status() ); ?>
</td>
<td class="order-total">
<td class="order-total" data-title="<?php _e( 'Total', 'woocommerce' ); ?>">
<?php echo sprintf( _n( '%s for %s item', '%s for %s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ); ?>
</td>
<td class="order-actions">