Sha256: 4ceec546c12e4ee6d3d73d5fbc8220c1be1a60302ba806f40f9aeef8c3993d9e
Contents?: true
Size: 1.05 KB
Versions: 287
Compression:
Stored size: 1.05 KB
Contents
Caboose.Store.Modules.CheckoutShipping = (function() { self = {}; self.initialize = function() { self.bind_event_handlers(); }; self.bind_event_handlers = function() { $('a.shipping_rate').click(self.shipping_click_handler); }; self.shipping_click_handler = function(event) { event.preventDefault(); $('#message').html("<p class='loading'>Saving information...</p>"); $.ajax({ url: '/checkout/shipping', type: 'put', data: { order_package_id: $(event.target).data('order_package_id'), shipping_method_id: $(event.target).data('shipping_method_id'), total: $(event.target).data('total') }, success: function(resp) { if (resp.errors && resp.errors.length > 0) $('#message').html("<p class='note error'>" + resp.errors[0] + "</p>"); else if (resp.success) window.location = '/checkout/gift-cards'; } }); return false; }; return self }).call(Caboose.Store);
Version data entries
287 entries across 287 versions & 1 rubygems