Sha256: e523acba8e03a691b810f70c0b64bd21c14424cbe59df1845a19c325654217cf
Contents?: true
Size: 1.05 KB
Versions: 312
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: { invoice_package_id: $(event.target).data('invoice_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
312 entries across 312 versions & 1 rubygems