Skip to content

Commit

Permalink
Remove redundant function
Browse files Browse the repository at this point in the history
  • Loading branch information
binarygit committed Nov 21, 2023
1 parent 23b55b6 commit 257cffc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions app/assets/javascripts/admin/spree/orders/shipments.js.erb
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Shipments AJAX API

$(document).ready(function() {

handle_ship_click = function(){
var link = $(this);
var shipment_number = link.data('shipment-number');
var url = Spree.url( Spree.routes.orders_api + "/" + order_number + "/shipments/" + shipment_number + "/ship.json");
$.ajax({
type: "PUT",
url: url
}).done(function( msg ) {
window.location.reload();
}).error(function( msg ) {
console.log(msg);
});
}
$('.admin-order-edit-form a.ship').click(handle_ship_click);

//handle shipping method edit click
$('a.edit-method').click(toggleMethodEdit);
$('a.cancel-method').click(toggleMethodEdit);
Expand Down

0 comments on commit 257cffc

Please sign in to comment.