Skip to content

Commit

Permalink
Allow devs to add 'no-link' class to elements to prevent order view l…
Browse files Browse the repository at this point in the history
…ink being triggered on row click

Closes woocommerce#18704
  • Loading branch information
mikejolley committed Jan 31, 2018
1 parent bbae2cd commit 1c57075
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/css/admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,9 @@ ul.wc_coupon_list_block {
tbody tr:hover:not(.status-trash) td {
cursor: pointer;
}
.no-link {
cursor: default !important;
}

// Columns.
td,
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/wc-orders.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jQuery( function( $ ) {
* Click a row.
*/
WCOrdersTable.prototype.onRowClick = function( e ) {
if ( $( e.target ).filter( 'a' ).length ) {
if ( $( e.target ).filter( 'a, a *, .no-link, .no-link *' ).length ) {
return true;
}

Expand Down

0 comments on commit 1c57075

Please sign in to comment.