summaryrefslogtreecommitdiff
path: root/StoneIsland/www
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www')
-rw-r--r--StoneIsland/www/css/account.css9
-rw-r--r--StoneIsland/www/css/blogs.css2
-rw-r--r--StoneIsland/www/index.html10
-rw-r--r--StoneIsland/www/js/index.js2
-rw-r--r--StoneIsland/www/js/lib/view/Serializable.js17
5 files changed, 37 insertions, 3 deletions
diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css
index 7e709197..fa4243c1 100644
--- a/StoneIsland/www/css/account.css
+++ b/StoneIsland/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/www/css/blogs.css b/StoneIsland/www/css/blogs.css
index 220cb2bf..c45658a0 100644
--- a/StoneIsland/www/css/blogs.css
+++ b/StoneIsland/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/www/index.html b/StoneIsland/www/index.html
index 4a0ced54..20cfb537 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -345,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>
@@ -398,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/www/js/index.js b/StoneIsland/www/js/index.js
index 468c0d7e..0b3531dd 100644
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -3,7 +3,7 @@ var app = (function(){
app.init = function(){
- sdk.init({ env: "test" })
+ sdk.init({ env: "production" })
app.bind()
app.build()
diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js
index f9abd011..98aa8ce3 100644
--- a/StoneIsland/www/js/lib/view/Serializable.js
+++ b/StoneIsland/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()