Merge pull request #18708 from woocommerce/fix/18704

Allow devs to add 'no-link' class to elements to prevent order view link being triggered on row click
This commit is contained in:
Claudiu Lodromanean 2018-01-31 10:54:51 -08:00 committed by GitHub
commit 664aa282d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2044,9 +2044,12 @@ ul.wc_coupon_list_block {
tbody tr {
border-top: 1px solid #f5f5f5;
}
tbody tr:hover:not(.status-trash) td {
tbody tr:hover:not(.status-trash):not(.no-link) td {
cursor: pointer;
}
.no-link {
cursor: default !important;
}
// Columns.
td,

View File

@ -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;
}