Bar chart changes

This commit is contained in:
Mike Jolley 2011-12-05 12:10:49 +00:00
parent cc40c87349
commit d37608e7f4
3 changed files with 35 additions and 27 deletions

View File

@ -918,7 +918,7 @@ function woocommerce_top_sellers() {
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
echo '<tr><th>'.$product_name.'</th><td><a href="'.$orders_link.'" style="width:'.$width.'%"><span>'.$sales.'</span></a></td></tr>';
echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.$sales.'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>';
endforeach;
?>
</tbody>
@ -994,7 +994,7 @@ function woocommerce_top_earners() {
<thead>
<tr>
<th><?php _e('Product', 'woothemes'); ?></th>
<th><?php _e('Sales', 'woothemes'); ?></th>
<th colspan="2"><?php _e('Sales', 'woothemes'); ?></th>
</tr>
</thead>
<tbody>
@ -1007,12 +1007,12 @@ function woocommerce_top_earners() {
if ($product) :
$product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>';
else :
$product_name = __('Product does not exist', 'woothemes');
$product_name = __('Product no longer exists', 'woothemes');
endif;
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
echo '<tr><th>'.$product_name.'</th><td><a href="'.$orders_link.'" style="width:'.$width.'%"><span>'.woocommerce_price($sales).'</span></a></td></tr>';
echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.woocommerce_price($sales).'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>';
endforeach;
?>
</tbody>
@ -1119,7 +1119,7 @@ function woocommerce_product_sales() {
<thead>
<tr>
<th><?php _e('Month', 'woothemes'); ?></th>
<th><?php _e('Sales', 'woothemes'); ?></th>
<th colspan="2"><?php _e('Sales', 'woothemes'); ?></th>
</tr>
</thead>
<tbody>
@ -1130,11 +1130,13 @@ function woocommerce_product_sales() {
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode(get_the_title($chosen_product_id)) . '&m=' . date('Ym', strtotime($date.'01')) . '&shop_order_status=completed,processing,on-hold');
echo '<tr><th><a href="'.$orders_link.'">'.date('F', strtotime($date.'01')).'</a></th><td>
<span style="width:'.$width.'%"><span>'.$sales.'</span></span>
<span class="alt" style="width:'.$width2.'%"><span>'.woocommerce_price($product_totals[$date]).'</span></span>
echo '<tr><th><a href="'.$orders_link.'">'.date('F', strtotime($date.'01')).'</a></th>
<td width="1%"><span>'.$sales.'</span><span class="alt">'.woocommerce_price($product_totals[$date]).'</span></td>
<td class="bars">
<span style="width:'.$width.'%">&nbsp;</span>
<span class="alt" style="width:'.$width2.'%">&nbsp;</span>
</td></tr>';
endforeach; else echo '<tr><td colspan="2">'.__('No sales :(', 'woothemes').'</td></tr>';
endforeach; else echo '<tr><td colspan="3">'.__('No sales :(', 'woothemes').'</td></tr>';
?>
</tbody>
</table>

View File

@ -210,8 +210,10 @@ img.ui-datepicker-trigger{vertical-align:middle;margin-top:-1px;cursor:pointer;}
#tooltip{color:#fff;font-size:12px;-moz-border-radius:4px;-webkit-border-radius:4px;-o-border-radius:4px;-khtml-border-radius:4px;border-radius:4px;opacity:0.8;}
table.bar_chart{width:100%;}table.bar_chart thead th{text-align:left;color:#ccc;padding:6px 0;}
table.bar_chart tbody th{padding:6px 0;width:25%;text-align:left !important;font-weight:normal !important;border-bottom:1px solid #fee;}
table.bar_chart tbody td{position:relative;text-align:left;padding:6px 0 6px 0;border-bottom:1px solid #fee;}table.bar_chart tbody td span,table.bar_chart tbody td a{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:4px;-webkit-border-radius:4px;-o-border-radius:4px;-khtml-border-radius:4px;border-radius:4px;}table.bar_chart tbody td span span,table.bar_chart tbody td a span{position:absolute;left:8px;color:#dec3d5 !important;font-size:11px;text-shadow:0 1px 0 #8a4b75;height:auto;background:transparent;}
table.bar_chart tbody td span.alt{clear:both;background:#47a03e;margin-top:6px;}table.bar_chart tbody td span.alt span{margin:0;color:#c5dec2 !important;text-shadow:0 1px 0 #47a03e;background:transparent;}
table.bar_chart tbody td{text-align:right;line-height:24px;padding:6px 6px 6px 0;border-bottom:1px solid #fee;}table.bar_chart tbody td span{color:#8a4b75;display:block;}
table.bar_chart tbody td span.alt{color:#47a03e;margin-top:6px;}
table.bar_chart tbody td.bars{position:relative;text-align:left;padding:6px 6px 6px 0;border-bottom:1px solid #fee;}table.bar_chart tbody td.bars span,table.bar_chart tbody td.bars a{text-decoration:none;clear:both;background:#8a4b75;float:left;display:block;line-height:24px;height:24px;-moz-border-radius:3px;-webkit-border-radius:3px;-o-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;}
table.bar_chart tbody td.bars span.alt{clear:both;background:#47a03e;}table.bar_chart tbody td.bars span.alt span{margin:0;color:#c5dec2 !important;text-shadow:0 1px 0 #47a03e;background:transparent;}
#woocommerce_allowed_countries_chzn .chzn-search{display:none;}
.chzn-container{font-size:13px;position:relative;display:inline-block;zoom:1;*display:inline;margin-right:5px;}
.chzn-container .chzn-drop{background:#fff;border:1px solid #aaa;border-top:0;position:absolute;top:29px;left:0;-webkit-box-shadow:0 4px 5px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 4px 5px rgba(0, 0, 0, 0.15);-o-box-shadow:0 4px 5px rgba(0, 0, 0, 0.15);box-shadow:0 4px 5px rgba(0, 0, 0, 0.15);z-index:999;}

View File

@ -1236,9 +1236,23 @@ table.bar_chart {
border-bottom: 1px solid #fee;
}
td {
text-align: right;
line-height: 24px;
padding: 6px 6px 6px 0;
border-bottom: 1px solid #fee;
span {
color: #8a4b75;
display: block;
}
span.alt {
color: #47a03e;
margin-top: 6px;
}
}
td.bars {
position: relative;
text-align: left;
padding: 6px 0 6px 0;
padding: 6px 6px 6px 0;
border-bottom: 1px solid #fee;
span, a {
text-decoration: none;
@ -1248,25 +1262,15 @@ table.bar_chart {
display: block;
line-height: 24px;
height: 24px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
-o-border-radius:4px;
-khtml-border-radius:4px;
border-radius:4px;
span {
position: absolute;
left: 8px;
color: #dec3d5 !important;
font-size: 11px;
text-shadow: 0 1px 0 #8a4b75;
height: auto;
background: transparent;
}
-moz-border-radius:3px;
-webkit-border-radius:3px;
-o-border-radius:3px;
-khtml-border-radius:3px;
border-radius:3px;
}
span.alt {
clear: both;
background: #47a03e;
margin-top: 6px;
span {
margin: 0;
color: #c5dec2 !important;