' + tablepress_list['donation-message-' + target] + '
' );
$( '.donation-message-after-click-message' ).delay( 10000 ).fadeOut( 2000, function() { $(this).remove(); } );
}
/* Remove original message */
$link.closest( 'div' ).remove();
break;
}
}
);
return false;
} );
/**
* Submit Bulk Actions only if an action was selected an a table's checkbox was checked
*
* @since 1.0.0
*/
$( '#doaction, #doaction2' ).on( 'click', function() {
var bulk_action,
confirm_message,
num_selected = $( '.tablepress-all-tables' ).find( 'tbody' ).find( 'input:checked' ).length;
// determine location of clicked bulk action controls
if ( 'doaction' === this.id ) {
bulk_action = 'top';
} else {
bulk_action = 'bottom';
}
// check whether an action was selected, and whether tables were selected
if ( '-1' === $( '#bulk-action-' + bulk_action ).val() ) {
return false;
}
if ( 0 === num_selected ) {
return false;
}
// Show AYS prompt for deletion
if ( 'delete' === $( '#bulk-action-' + bulk_action ).val() ) {
if ( 1 === num_selected ) {
confirm_message = tablepress_common.ays_delete_single_table;
} else {
confirm_message = tablepress_common.ays_delete_multiple_tables;
}
if ( ! confirm( confirm_message ) ) {
return false;
}
}
} );
} );