Fix delete of shipping and fee line items. Remove checkbox for refunds.

This commit is contained in:
Mike Jolley 2014-07-22 14:38:07 +01:00
parent 93155c9e11
commit b032c857ee
4 changed files with 8 additions and 6 deletions

View File

@ -415,9 +415,11 @@ jQuery( function ( $ ) {
var item_ids = [];
$(selected_rows).each( function() {
var $item = $(this).closest('tr.item, tr.fee');
var $item = $(this).closest('tr');
item_ids.push( $item.attr( 'data-order_item_id' ) );
if ( $item.attr( 'data-order_item_id' ) ) {
item_ids.push( $item.attr( 'data-order_item_id' ) );
}
} );
if ( item_ids.length == 0 ) {
@ -445,7 +447,7 @@ jQuery( function ( $ ) {
type: 'POST',
success: function( response ) {
$(selected_rows).each( function() {
$(this).closest('tr.item, tr.fee').remove();
$(this).closest('tr').remove();
} );
removeOrderItemsLoading();
}

File diff suppressed because one or more lines are too long

View File

@ -144,7 +144,7 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
<select>
<option value=""><?php _e( 'Actions', 'woocommerce' ); ?></option>
<optgroup label="<?php _e( 'Edit', 'woocommerce' ); ?>">
<option value="delete"><?php _e( 'Delete line item(s)', 'woocommerce' ); ?></option>
<option value="delete"><?php _e( 'Delete selected line item(s)', 'woocommerce' ); ?></option>
</optgroup>
<optgroup label="<?php _e( 'Stock Actions', 'woocommerce' ); ?>">
<option value="reduce_stock"><?php _e( 'Reduce line item stock', 'woocommerce' ); ?></option>

View File

@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<tr class="refund <?php echo ( ! empty( $class ) ) ? $class : ''; ?>" data-order_refund_id="<?php echo $refund->id; ?>">
<td class="check-column"><input type="checkbox" /></td>
<td class="check-column"></td>
<td class="thumb"><div></div></td>