diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-12-03 15:19:43 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-12-03 15:19:43 -0500 |
| commit | 9b656e51232f1b1f2cf210908b569b1a224e7a90 (patch) | |
| tree | b73727987c57b201c5ed6d7d4311195a20a18b73 /StoneIsland/platforms/ios/www | |
| parent | 0e783ecb14849eb8ab36f3c4d591ffdbb2e8e942 (diff) | |
date css
Diffstat (limited to 'StoneIsland/platforms/ios/www')
8 files changed, 71 insertions, 13 deletions
diff --git a/StoneIsland/platforms/ios/www/css/account.css b/StoneIsland/platforms/ios/www/css/account.css index 7e709197..fa4243c1 100644 --- a/StoneIsland/platforms/ios/www/css/account.css +++ b/StoneIsland/platforms/ios/www/css/account.css @@ -439,6 +439,15 @@ input.switch:checked + label:after { top: 9px; color: #aaa; } +.select-wrapper [type=date] { + opacity: 0; + width: 100%; + height: 35px; + line-height: 35px; + position: absolute; + top: -5px; + left: -1px; +} .select-wrapper select { opacity: 0; width: 100%; diff --git a/StoneIsland/platforms/ios/www/css/blogs.css b/StoneIsland/platforms/ios/www/css/blogs.css index 220cb2bf..c45658a0 100644 --- a/StoneIsland/platforms/ios/www/css/blogs.css +++ b/StoneIsland/platforms/ios/www/css/blogs.css @@ -165,6 +165,7 @@ box-sizing:border-box } +/* .fade-cover::before { border:1px solid black; top:50%; @@ -180,6 +181,7 @@ display:block; background:rgba(255,255,255,1); } +*/ #story img { box-sizing:border-box; diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index 7249e157..20cfb537 100644 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -287,7 +287,9 @@ <div id="closed"> <div class="closed_store_msg"> - <h3>THIS STORE IS CURRENTLY CLOSED</h3> + <h3> + THIS STORE IS CURRENTLY CLOSED + </h3> <div class="website_link"> visit<br> <b>www.stoneisland.com</b> @@ -343,7 +345,10 @@ <input type="text" name="Surname" placeholder="LAST NAME" required> <input type="email" name="Email" placeholder="EMAIL ADDRESS" required> <input type="email" name="ConfirmEmail" placeholder="CONFIRM EMAIL ADDRESS" required> - <input type="date" name="BirthDay" placeholder="BIRTHDAY (MM/DD/YYYY)" required> + <div class="select-wrapper date-wrapper"> + <span>BIRTHDAY (MM/DD/YYYY)</span> + <input type="date" name="BirthDay" placeholder="BIRTHDAY (MM/DD/YYYY)" required> + </div> <h2>PASSWORD</h2> <input type="password" name="Password" placeholder="PASSWORD (7 CHARACTERS OR MORE)" required> @@ -396,7 +401,10 @@ <input type="text" name="Name" placeholder="FIRST NAME" required> <input type="text" name="Surname" placeholder="LAST NAME" required> <input type="email" name="Email" placeholder="EMAIL ADDRESS" required> - <input type="date" name="BirthDay" placeholder="BIRTHDAY (MM/DD/YYYY)" required> + <div class="select-wrapper date-wrapper"> + <span>BIRTHDAY (MM/DD/YYYY)</span> + <input type="date" name="BirthDay" placeholder="BIRTHDAY (MM/DD/YYYY)" required> + </div> <h2>CHANGE PASSWORD</h2> <input type="password" name="CurrentPassword" placeholder="CURRENT PASSWORD" required> diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js index 16989eb0..0b3531dd 100644 --- a/StoneIsland/platforms/ios/www/js/index.js +++ b/StoneIsland/platforms/ios/www/js/index.js @@ -70,12 +70,12 @@ var app = (function(){ app.view = null app.router = new SiteRouter () - if (sdk.env == "test") { - app.router.launch() - } - else { +// if (sdk.env == "test") { +// app.router.launch() +// } +// else { app.account.connect( app.router.launch.bind(app.router) ) - } +// } $("body").removeClass("loading") } diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 327b5328..9b49abbd 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -10,7 +10,8 @@ var BlogView = View.extend({ fetch: function(){ $.ajax({ method: "GET", - url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", +// url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", + url: "http://stone.sup.land/db.json", success: this.success.bind(this), cache: true, }) @@ -37,11 +38,22 @@ var BlogView = View.extend({ app.collection.setCollectionName( data.store[0].collection ) app.closed.populate(data.store[0].ClosedStoreImages) - if (data.store[0].StoreIsOpen !== "true") { - app.closed.storeIsClosed = true + switch (data.store[0].StoreStatus) { + case "open": + app.closed.storeIsClosed = false + break + case "closed": + app.closed.storeIsClosed = true + app.closed.storeOpenDate = null + break + case "openson": + app.closed.storeIsClosed = true + app.closed.storeOpenDate = moment(data.store[0].OpensOn) + break } + console.log(data.store[0].StoreStatus) + var fits_large = (data.store[0].FitsLarge === "true") - app.product.$fit.toggle( fits_large ) app.product.$sizing.toggle( fits_large ) @@ -52,7 +64,7 @@ var BlogView = View.extend({ app.gallery_id = data.store[0].CollectionId - // app.collection.fetch() + app.collection.fetch() }, })
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js index 77dc15b1..5f8c1e84 100644 --- a/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/ClosedStoreView.js @@ -21,6 +21,15 @@ var ClosedStoreView = View.extend({ document.body.className = "closed" this.animate() app.footer.hide() + console.log(this) + if (this.storeOpenDate) { + var date = moment(this.storeOpenDate).format("MM/DD") + console.log(date) + $(".closed_store_msg h3").html("THIS STORE WILL OPEN ON " + date) + } + else { + $(".closed_store_msg h3").html("THIS STORE IS CURRENTLY CLOSED") + } }, hide: function(){ diff --git a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js index 056f2a52..d4315514 100644 --- a/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/CollectionView.js @@ -26,6 +26,7 @@ var CollectionView = ScrollableView.extend({ show: function(){ if (app.closed.storeIsClosed) { + // (! this.storeOpenDate || moment().diff(this.storeOpenDate) > 0 ) ) { return app.closed.show() } app.footer.show("FILTER") diff --git a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js index f9abd011..98aa8ce3 100644 --- a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js +++ b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js @@ -2,7 +2,9 @@ var SerializableView = View.extend({ events: { "change select": "update_select", + "change [type=date]": "update_date", "focus input": "focus_input", + "click .date-wrapper": "focus_date", "submit form": "save", }, @@ -21,6 +23,10 @@ var SerializableView = View.extend({ if ($el.attr("type") == "checkbox") { $el.prop("checked", value) } + if ($el.attr("type") == "date") { + $el.val( value ) + this.update_date({ currentTarget: $el }) + } else if ($el.prop("tagName") == "SELECT") { $el.val( value ) this.update_select({ currentTarget: $el }) @@ -57,12 +63,23 @@ var SerializableView = View.extend({ $(e.currentTarget).removeClass("error_hilite") }, + focus_date: function(e){ + $(e.currentTarget).find("input").focus() + }, + update_select: function(e){ var $target = $(e.currentTarget), value = $target.val() var label = $target.find("option").filter(function(){ return this.value === value }).html() $target.parent().addClass("picked") $target.parent().find("span").html(label) }, + + update_date: function(e){ + var $target = $(e.currentTarget), value = $target.val() + var label = moment(value).format("MM/DD/YYYY") + $target.parent().addClass("picked") + $target.parent().find("span").html(label) + }, validate: function(data, errors){ var data = data || this.serialize() |
