Minor spacing issues

This commit is contained in:
Mike Jolley 2016-03-23 13:06:15 +00:00
parent f73149feaf
commit 95de7f5a2c
2 changed files with 15 additions and 15 deletions

View File

@ -862,17 +862,17 @@ jQuery( function ( $ ) {
if ( $( this ).is( 'tr' ) ) {
$row = $( this );
} else {
$row = $( this ).closest('tr');
$row = $( this ).closest( 'tr' );
}
var $table = $( this ).closest('table');
var $table = $( this ).closest( 'table' );
if ( $row.is( '.selected' ) ) {
$row.removeClass('selected');
$row.removeClass( 'selected' );
} else {
$row.addClass('selected');
$row.addClass( 'selected' );
}
var $rows = $table.find('tr.selected');
var $rows = $table.find( 'tr.selected' );
if ( $rows.length ) {
$( 'div.wc-order-item-bulk-edit' ).slideDown();
@ -890,7 +890,7 @@ jQuery( function ( $ ) {
do_delete: function( e ) {
e.preventDefault();
var $table = $( 'table.woocommerce_order_items' );
var $rows = $table.find('tr.selected');
var $rows = $table.find( 'tr.selected' );
if ( $rows.length && window.confirm( woocommerce_admin_meta_boxes.remove_item_notice ) ) {
@ -911,9 +911,9 @@ jQuery( function ( $ ) {
data: data,
type: 'POST',
success: function() {
$rows.each(function() {
$rows.each( function() {
$( this ).remove();
});
} );
wc_meta_boxes_order_items.unblock();
}
});
@ -925,7 +925,7 @@ jQuery( function ( $ ) {
wc_meta_boxes_order_items.block();
var $table = $( 'table.woocommerce_order_items' );
var $rows = $table.find('tr.selected');
var $rows = $table.find( 'tr.selected' );
var quantities = {};
var item_ids = $.map( $rows, function( $row ) {
return parseInt( $( $row ).data( 'order_item_id' ), 10 );
@ -961,7 +961,7 @@ jQuery( function ( $ ) {
wc_meta_boxes_order_items.block();
var $table = $( 'table.woocommerce_order_items' );
var $rows = $table.find('tr.selected');
var $rows = $table.find( 'tr.selected' );
var quantities = {};
var item_ids = $.map( $rows, function( $row ) {
return parseInt( $( $row ).data( 'order_item_id' ), 10 );

View File

@ -9,11 +9,11 @@
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$product_link = $_product ? admin_url( 'post.php?post =' . absint( $_product->id ) . '&action =edit' ) : '';
$thumbnail = $_product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : '';
$tax_data = empty( $legacy_order ) && wc_tax_enabled() ? maybe_unserialize( isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '' ) : false;
$item_total = ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : '';
$item_subtotal = ( isset( $item['line_subtotal'] ) ) ? esc_attr( wc_format_localized_price( $item['line_subtotal'] ) ) : '';
$product_link = $_product ? admin_url( 'post.php?post=' . absint( $_product->id ) . '&action=edit' ) : '';
$thumbnail = $_product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : '';
$tax_data = empty( $legacy_order ) && wc_tax_enabled() ? maybe_unserialize( isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '' ) : false;
$item_total = ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : '';
$item_subtotal = ( isset( $item['line_subtotal'] ) ) ? esc_attr( wc_format_localized_price( $item['line_subtotal'] ) ) : '';
?>
<tr class="item <?php echo apply_filters( 'woocommerce_admin_html_order_item_class', ( ! empty( $class ) ? $class : '' ), $item ); ?>" data-order_item_id="<?php echo $item_id; ?>">
<td class="thumb">