Dashboards widgets
This commit is contained in:
@@ -5,4 +5,34 @@ jQuery(document).ready(function ($) {
|
||||
$('#wiaas_delivery_process_navigation_action').val(action);
|
||||
|
||||
});
|
||||
|
||||
$('#wiaas_delivery_process_add_note').click(function(e) {
|
||||
if ( ! $( 'textarea#wiaas_add_order_note' ).val() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$( '#wiaas_delivery_process_order_notes' ).block({
|
||||
message: null,
|
||||
overlayCSS: {
|
||||
background: '#fff',
|
||||
opacity: 0.6
|
||||
}
|
||||
});
|
||||
|
||||
var data = {
|
||||
action: 'wiaas_add_order_note',
|
||||
post_id: $( 'textarea#wiaas_add_order_note' ).data('order-id'),
|
||||
note: $( 'textarea#wiaas_add_order_note' ).val(),
|
||||
security: $( 'textarea#wiaas_add_order_note' ).data('nonce'),
|
||||
};
|
||||
|
||||
|
||||
$.post( ajaxurl, data, function( response ) {
|
||||
$( '#delivery_process_order_notes_list' ).prepend( response );
|
||||
$( '#wiaas_delivery_process_order_notes' ).unblock();
|
||||
$( '#wiaas_add_order_note' ).val( '' );
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user