Sha256: 16fc3e4b20a20341613608911f95c46864bde47ee12b78e0f90776e9836d8305
Contents?: true
Size: 974 Bytes
Versions: 24
Compression:
Stored size: 974 Bytes
Contents
Caboose.Store.Modules.CheckoutStep3 = (function() { self = {}; self.initialize = function() { self.bind_event_handlers(); }; self.bind_event_handlers = function() { $('#checkout button').click(self.shipping_click_handler); }; self.shipping_click_handler = function(event) { $('#message').html("<p class='loading'>Saving information...</p>"); $.ajax({ url: '/checkout/shipping', type: 'put', data: { shipping_method: $(event.target).data('shipping-method'), shipping_code: $(event.target).data('shipping-code') }, 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/step-four'; } }); return false; }; return self }).call(Caboose.Store);
Version data entries
24 entries across 24 versions & 1 rubygems