Always prevent default/return false #10907

This commit is contained in:
Claudio Sanches 2016-05-12 16:48:01 -03:00
parent 9c1aa8afe8
commit 06dbc81d66
2 changed files with 6 additions and 6 deletions

View File

@ -1191,7 +1191,7 @@ jQuery( function ( $ ) {
delete_order_note: function() {
if ( window.confirm( woocommerce_admin_meta_boxes.i18n_delete_note ) ) {
var note = $( this ).closest( 'li.note' );
$( note ).block({
message: null,
overlayCSS: {
@ -1199,19 +1199,19 @@ jQuery( function ( $ ) {
opacity: 0.6
}
});
var data = {
action: 'woocommerce_delete_order_note',
note_id: $( note ).attr( 'rel' ),
security: woocommerce_admin_meta_boxes.delete_order_note_nonce
};
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function() {
$( note ).remove();
});
return false;
}
return false;
}
};

File diff suppressed because one or more lines are too long