Clickable elements
This commit is contained in:
parent
e0bb7b35fd
commit
dea454c88e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1960,6 +1960,10 @@ ul.wc_coupon_list_block {
|
|||
float:right;
|
||||
}
|
||||
}
|
||||
.column-shipping_address,
|
||||
.column-billing_address {
|
||||
width: 20ch;
|
||||
}
|
||||
th:first-child,
|
||||
td:first-child {
|
||||
padding-left: 2em;
|
||||
|
@ -1969,9 +1973,6 @@ ul.wc_coupon_list_block {
|
|||
padding-right: 2em;
|
||||
}
|
||||
tbody {
|
||||
tr:nth-child(odd), .alternate {
|
||||
//background-color: #fff;
|
||||
}
|
||||
th, td {
|
||||
border-top: 1px solid #f5f5f5;
|
||||
}
|
||||
|
@ -2017,7 +2018,6 @@ ul.wc_coupon_list_block {
|
|||
}
|
||||
tr:hover {
|
||||
td, th {
|
||||
//background: #F9F9F9;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,7 @@ jQuery( function( $ ) {
|
|||
*/
|
||||
WCOrdersTable.prototype.onPreview = function() {
|
||||
var $previewButton = $( this ),
|
||||
$order_id = $previewButton.data( 'order-id' ),
|
||||
$order_table = $previewButton.closest( 'table' );
|
||||
$order_id = $previewButton.data( 'order-id' );
|
||||
|
||||
if ( $previewButton.data( 'order-data' ) ) {
|
||||
$( this ).WCBackboneModal({
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(e){if("undefined"==typeof wc_orders_params)return!1;var r=function(){e(document).on("click",".post-type-shop_order .wp-list-table tbody td",this.onRowClick).on("click",".order-preview",this.onPreview)};r.prototype.onRowClick=function(r){if(e(r.target).filter("a").length)return!0;var a=e(this).closest("tr").find("a.order-view").attr("href");window.location=a},r.prototype.onPreview=function(){var r=e(this),a=r.data("order-id"),t=r.closest("table");return r.data("order-data")?e(this).WCBackboneModal({template:"wc-modal-view-order",variable:r.data("order-data")}):(r.addClass("disabled"),e.ajax({url:wc_orders_params.ajax_url,data:{order_id:a,action:"woocommerce_get_order_details",security:wc_orders_params.preview_nonce},type:"GET",success:function(a){a.success&&(r.data("order-data",a.data),e(this).WCBackboneModal({template:"wc-modal-view-order",variable:a.data})),t.unblock()}})),!1},new r});
|
||||
jQuery(function(e){if("undefined"==typeof wc_orders_params)return!1;var r=function(){e(document).on("click",".post-type-shop_order .wp-list-table tbody td",this.onRowClick).on("click",".order-preview:not(.disabled)",this.onPreview)};r.prototype.onRowClick=function(r){if(e(r.target).filter("a").length)return!0;var a=e(this).closest("tr").find("a.order-view").attr("href");window.location=a},r.prototype.onPreview=function(){var r=e(this),a=r.data("order-id");return r.data("order-data")?e(this).WCBackboneModal({template:"wc-modal-view-order",variable:r.data("order-data")}):(r.addClass("disabled"),e.ajax({url:wc_orders_params.ajax_url,data:{order_id:a,action:"woocommerce_get_order_details",security:wc_orders_params.preview_nonce},type:"GET",success:function(a){e(".order-preview").removeClass("disabled"),a.success&&(r.data("order-data",a.data),e(this).WCBackboneModal({template:"wc-modal-view-order",variable:a.data}))}})),!1},new r});
|
|
@ -331,12 +331,12 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
|
|||
|
||||
<# if ( data.data.billing.email ) { #>
|
||||
<strong><?php esc_html_e( 'Email', 'woocommerce' ); ?></strong>
|
||||
{{ data.data.billing.email }}
|
||||
<a href="mailto:{{ data.data.billing.email }}">{{ data.data.billing.email }}</a>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.data.billing.phone ) { #>
|
||||
<strong><?php esc_html_e( 'Phone', 'woocommerce' ); ?></strong>
|
||||
{{ data.data.billing.phone }}
|
||||
<a href="tel:{{ data.data.billing.phone }}">{{ data.data.billing.phone }}</a>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.payment_via ) { #>
|
||||
|
@ -350,7 +350,7 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
|
|||
<# if ( data.ship_to_billing ) { #>
|
||||
{{{ data.formatted_billing_address }}}
|
||||
<# } else { #>
|
||||
{{{ data.formatted_shipping_address }}}
|
||||
<a href="{{ data.shipping_address_map_url }}" target="_blank">{{{ data.formatted_shipping_address }}}</a>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.data.customer_note ) { #>
|
||||
|
|
|
@ -556,6 +556,7 @@ class WC_AJAX {
|
|||
'needs_shipping' => $order->needs_shipping_address(),
|
||||
'formatted_billing_address' => ( $address = $order->get_formatted_billing_address() ) ? $address : __( 'N/A', 'woocommerce' ),
|
||||
'formatted_shipping_address' => ( $address = $order->get_formatted_shipping_address() ) ? $address: __( 'N/A', 'woocommerce' ),
|
||||
'shipping_address_map_url' => $order->get_shipping_address_map_url(),
|
||||
'payment_via' => $order->get_payment_method_title() . ( $order->get_transaction_id() ? ' (' . $order->get_transaction_id() . ')' : '' ),
|
||||
'shipping_via' => $order->get_shipping_method(),
|
||||
) );
|
||||
|
|
Loading…
Reference in New Issue