Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Click a row.
- */
- WCOrdersTable.prototype.onRowClick = function( e ) {
- if ( $( e.target ).filter( 'a, a *, .no-link, .no-link *, button, button *' ).length ) {
- return true;
- }
- if ( window.getSelection && window.getSelection().toString().length ) {
- return true;
- }
- var $row = $( this ).closest( 'tr' ),
- href = $row.find( 'a.order-view' ).attr( 'href' );
- if ( href && href.length ) {
- e.preventDefault();
- if ( e.metaKey || e.ctrlKey ) {
- window.open( href, '_blank' );
- } else {
- window.location = href;
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement