diff options
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/account/ShippingView.js')
| -rwxr-xr-x | StoneIsland/platforms/android/assets/www/js/lib/account/ShippingView.js | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/account/ShippingView.js b/StoneIsland/platforms/android/assets/www/js/lib/account/ShippingView.js deleted file mode 100755 index 4c45e97f..00000000 --- a/StoneIsland/platforms/android/assets/www/js/lib/account/ShippingView.js +++ /dev/null @@ -1,89 +0,0 @@ -var ShippingView = FormView.extend({ - - el: "#shipping", - - action: sdk.address.add, - - events: { - }, - - test_data: { - "Name":"name", - "Surname":"surname", - "Address":"address1\naddress2", - "IsDefault":false, - "IsBillingDefault":false, - "IsOwner":false, - "ZipCode":"88040", - "City":"City", - "Province":"NY", - "Phone":"1234567890", - "Mobile":"Mobile", - "Mail":"Mail", - "UserId": sdk.auth.user_id, - }, - - initialize: function(){ - this.$form = this.$(".form") - this.$msg = this.$(".msg") - this.address = new AddressView ({ parent: this }) - this.scroller = ScrollFactory('#shipping', app.iscroll_options) - }, - - show: function(){ - if (! auth.logged_in()) { return app.router.go("intro") } - if (! navigator.onLine) { - app.closed.showElement() - app.closed.setMessage("PLEASE GO ONLINE TO<br>EDIT YOUR SHIPPING INFO.", "") - return - } -// this.preload( this.data || this.test_data ) - app.account.consent.check() - app.footer.show("SAVE") - document.body.className = "shipping" - this.deferScrollToTop() - }, - - populate: function(data){ - this.data = data || this.data - this.address.populate(data) - }, - - finalize: function(data){ - if (this.address.data && this.address.data.Id) { - sdk.address.destroy({ - id: this.address.data.Id, - success: function(){}, - error: function(){}, - }) - } - - data.IsDefault = "true" // this.$isDefault.prop("checked") ? "true" : "false" - data.UserId = sdk.auth.user_id - - console.log(data) - return data - }, - - success: function(data){ - app.curtain.show("loading") - app.account.listAddresses({ - success: function(){ - this.$msg.html('Your address has been saved.') - app.curtain.hide("loading") - }.bind(this), - error: function(){ - app.curtain.hide("loading") - }, - }) - }, - - error: function(data){ - console.log(data) - }, - - cancel: function(){ - app.router.go("intro") - }, - -})
\ No newline at end of file |
