Moved add tax button, and tidied up tax column display

This commit is contained in:
Mike Jolley 2014-07-22 11:54:59 +01:00
parent 3b71920d1c
commit 0c5be5f054
3 changed files with 43 additions and 26 deletions

File diff suppressed because one or more lines are too long

View File

@ -766,9 +766,6 @@ ul.wc_coupon_list_block {
font-size: 1em; font-size: 1em;
} }
} }
th.line_tax {
white-space: nowrap;
}
.quantity { .quantity {
text-align: center; text-align: center;
input { input {
@ -848,18 +845,38 @@ ul.wc_coupon_list_block {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARklEQVQYGWP8//8/AzGACV3Rnj17/oMwujiGQnQFMD7RChlBbsRmFcwkEO3i4sJImonIumGmg0xBFifaRKIVgj2DbAUuNgCfThpracSKqwAAAABJRU5ErkJggg==) no-repeat center; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARklEQVQYGWP8//8/AzGACV3Rnj17/oMwujiGQnQFMD7RChlBbsRmFcwkEO3i4sJImonIumGmg0xBFifaRKIVgj2DbAUuNgCfThpracSKqwAAAABJRU5ErkJggg==) no-repeat center;
} }
} }
.delete-order-tax { th.line_tax {
.ir; white-space: nowrap;
display: inline-block; }
margin: 0; .line_tax {
&:before { padding: 8px 18px 8px 8px;
.icon; .line_tax_wrapper {
content: "\e013"; position: relative;
color: #999; display: block;
}
.delete-order-tax {
.ir;
font-size: 12px;
visibility: hidden;
float: right;
margin: 2px -18px 0 0;
&:before {
.icon( "\e013" );
color:white;
background-color: #000;
-webkit-border-radius:100%;
border-radius:100%;
border: 1px solid #000;
box-shadow:0 1px 2px rgba(0,0,0,0.2);
}
&:hover:before {
border-color: @red;
background-color: @red;
}
} }
&:hover { &:hover {
&:before { .delete-order-tax {
color: @red; visibility: visible;
} }
} }
} }

View File

@ -35,17 +35,17 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
foreach ( $order_taxes as $tax_id => $tax_item ) : foreach ( $order_taxes as $tax_id => $tax_item ) :
$tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] ); $tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' ); $tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
$column_label = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
?> ?>
<th class="line_tax tips" data-tip="<?php
<th class="line_tax"> echo esc_attr( $tax_item['name'] . ' (' . $tax_class_name . ')' );
<span><?php echo esc_attr( $tax_class_name ); ?> </span> ?>">
<span class="tips" data-tip="<?php <span class="line_tax_wrapper">
echo esc_attr( $tax_item['label'] . ' (' . $tax_item['name'] . ')' ); <?php echo esc_attr( $column_label ); ?>
?>">[?]</span> <input type="hidden" name="order_taxes[<?php echo $tax_id; ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>">
<input type="hidden" name="order_taxes[<?php echo $tax_id; ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>"> <a class="delete-order-tax" href="#" data-rate_id="<?php echo $tax_id; ?>"></a>
<a class="delete-order-tax" href="#" data-rate_id="<?php echo $tax_id; ?>"></a> </span>
</th> </th>
<?php <?php
endforeach; endforeach;
endif; endif;
@ -155,6 +155,9 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
</p> </p>
<p class="add-items"> <p class="add-items">
<button type="button" class="button add-line-item"><?php _e( 'Add line item(s)', 'woocommerce' ); ?></button> <button type="button" class="button add-line-item"><?php _e( 'Add line item(s)', 'woocommerce' ); ?></button>
<?php if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) : ?>
<button type="button" class="button add-order-tax"><?php _e( 'Add Tax', 'woocommerce' ); ?></button>
<?php endif; ?>
<button type="button" class="button refund-items"><?php _e( 'Refund', 'woocommerce' ); ?></button> <button type="button" class="button refund-items"><?php _e( 'Refund', 'woocommerce' ); ?></button>
<button type="button" class="button button-primary calculate-action"><?php _e( 'Calculate Total', 'woocommerce' ); ?></button> <button type="button" class="button button-primary calculate-action"><?php _e( 'Calculate Total', 'woocommerce' ); ?></button>
</p> </p>
@ -163,9 +166,6 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
<button type="button" class="button add-order-item"><?php _e( 'Add product(s)', 'woocommerce' ); ?></button> <button type="button" class="button add-order-item"><?php _e( 'Add product(s)', 'woocommerce' ); ?></button>
<button type="button" class="button add-order-fee"><?php _e( 'Add fee', 'woocommerce' ); ?></button> <button type="button" class="button add-order-fee"><?php _e( 'Add fee', 'woocommerce' ); ?></button>
<button type="button" class="button add-order-shipping"><?php _e( 'Add shipping cost', 'woocommerce' ); ?></button> <button type="button" class="button add-order-shipping"><?php _e( 'Add shipping cost', 'woocommerce' ); ?></button>
<?php if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) : ?>
<button type="button" class="button add-order-tax"><?php _e( 'Add Tax', 'woocommerce' ); ?></button>
<?php endif; ?>
<button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce' ); ?></button> <button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce' ); ?></button>
<button type="button" class="button button-primary save-action"><?php _e( 'Save', 'woocommerce' ); ?></button> <button type="button" class="button button-primary save-action"><?php _e( 'Save', 'woocommerce' ); ?></button>
</div> </div>