diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-30 16:14:29 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-30 16:14:29 -0500 |
| commit | 840cdf39595c6b8a29d2c91447d9fb8a91582a59 (patch) | |
| tree | 76ec09a7693993f7229948a79dace3f268f001ec /StoneIsland/www | |
| parent | 7920b278e296e99a069c7ab8b78b271e9665a84a (diff) | |
ui changes
Diffstat (limited to 'StoneIsland/www')
| -rw-r--r-- | StoneIsland/www/css/products.css | 6 | ||||
| -rw-r--r-- | StoneIsland/www/index.html | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/index.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/BlogView.js | 10 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartSummary.js | 5 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/IntroView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/CollectionView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 37 |
9 files changed, 64 insertions, 4 deletions
diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css index 147e043f..c712eb22 100644 --- a/StoneIsland/www/css/products.css +++ b/StoneIsland/www/css/products.css @@ -12,6 +12,9 @@ width: 49vw; height: 63vw; } +#collection.gray { + background: rgba(245,245,245,1.0); +} .product #product { display: block } #product { @@ -33,6 +36,9 @@ width: 100vw; height: 52vh; } +.gallery.gray { + background: rgba(245,245,245,1.0); +} .gallery .item { width: 100vw; diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index 1f5a8f55..ab5ae2d5 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -753,6 +753,9 @@ <div class="cc"></div> + <div class="cc_confirm"> + <h3>PLEASE ENTER YOUR SECURITY CODE TO CONFIRM</h3> + <input type="number" name="Cvv" placeholder="SECURITY CODE" required> </div> <div class="container-fill"> diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 1426cd5a..546bd637 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -5,7 +5,7 @@ var app = (function(){ app.bind() app.build() - sdk.init({ env: "development" }) + sdk.init({ env: "test" }) app.iscroll_options = { mouseWheel: true, diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 19666f8b..3cfab914 100644 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -42,6 +42,16 @@ var BlogView = View.extend({ if (data.store[0].StoreIsOpen !== "true") { app.closed.storeIsClosed = true } + var fits_large = (data.store[0].FitsLarge === "true") + + app.product.$fit.toggle( fits_large ) + app.product.$sizing.toggle( fits_large ) + + if (data.store[0].BackgroundIsGray === "true") { + app.collection.$el.addClass("gray") + app.product.gallery.$el.addClass("gray") + } + }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/cart/CartSummary.js b/StoneIsland/www/js/lib/cart/CartSummary.js index 7872d32c..9a24afa5 100644 --- a/StoneIsland/www/js/lib/cart/CartSummary.js +++ b/StoneIsland/www/js/lib/cart/CartSummary.js @@ -158,6 +158,8 @@ var CartSummary = ScrollableView.extend({ var $el = $( e.currentTarget ).closest(".cart_item_row") var data = $el.data() + console.log(this.data.Cart) + this.data.Cart.Totals.TotalWithoutPromotions -= data.price this.data.Cart.Totals.TotalToPay -= data.price this.data.Cart.Items = this.data.Cart.Items.filter(function(item){ @@ -173,13 +175,14 @@ var CartSummary = ScrollableView.extend({ this.empty() } + app.curtain.show("loading") sdk.cart.delete_item({ data: { Code10: data.code, Size: data.size, }, success: function(){ - console.log("damn") + app.curtain.hide("loading") }, }) }, diff --git a/StoneIsland/www/js/lib/nav/IntroView.js b/StoneIsland/www/js/lib/nav/IntroView.js index 87e68959..2d8dca43 100644 --- a/StoneIsland/www/js/lib/nav/IntroView.js +++ b/StoneIsland/www/js/lib/nav/IntroView.js @@ -34,6 +34,7 @@ var IntroView = View.extend({ else { heading = e.alpha || 0 } + heading = - heading this.compass.style[transformProp] = "translateZ(0) translateX(-50%) translateY(-50%) rotate(" + heading + "deg)" }, diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 8ea03bd4..e35b789d 100644 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -36,7 +36,7 @@ var CollectionView = ScrollableView.extend({ this.fetch() }, - ok: function(){ + save: function(){ this.filterView.filter() }, diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index e151c208..3e21b994 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -20,6 +20,8 @@ var ProductView = ScrollableView.extend({ this.$size = this.$(".size") this.$color = this.$(".color") this.$body = this.$(".body") + this.$fit = this.$(".fit") + this.$sizing = this.$(".sizing") }, show: function(){ diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index 0316e234..3ff2e1d2 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -140,6 +140,22 @@ sdk.cart = (function(){ }) } + cart.get_card_types = function(opt){ + return $.ajax({ + method: "GET", + url: sdk.path("Cart.API/1.6", "cardTypes.json"), + headers: { + "x-yoox-appname": auth.appname, + "x-yoox-cart-token": cart.token, + }, + data: "", + success: function(data){ + opt.success(data) + }, + error: opt.error, + }) + } + // use with full CC data if not storing it in wallet cart.set_credit_card = function(opt){ return $.ajax({ @@ -189,7 +205,7 @@ sdk.cart = (function(){ }) } - cart.finalize = function(opt){ + cart.secure_finalize = function(opt){ return $.ajax({ method: "POST", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/secureFinalizer.json"), @@ -208,6 +224,25 @@ sdk.cart = (function(){ error: opt.error, }) } + + cart.finalize = function(opt){ + return $.ajax({ + method: "POST", + url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/finalizer.json"), + headers: { + "x-yoox-appname": auth.appname, + "x-yoox-cart-token": cart.token, + }, + data: JSON.stringify( opt.data || {} ), + success: function(data){ + console.log(data) + // order number is: + // "Info": "2905Y07FA13020" + opt.success(data) + }, + error: opt.error, + }) + } return cart })()
\ No newline at end of file |
