summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib')
-rwxr-xr-xStoneIsland/www/js/lib/auth/LoginView.js2
-rwxr-xr-xStoneIsland/www/js/lib/blogs/ArchiveView.js3
-rwxr-xr-xStoneIsland/www/js/lib/nav/AddressView.js5
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/ProductView.js3
-rwxr-xr-xStoneIsland/www/js/lib/view/Scrollable.js2
6 files changed, 15 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/auth/LoginView.js b/StoneIsland/www/js/lib/auth/LoginView.js
index 504827c8..8af25914 100755
--- a/StoneIsland/www/js/lib/auth/LoginView.js
+++ b/StoneIsland/www/js/lib/auth/LoginView.js
@@ -33,7 +33,7 @@ var LoginView = FormView.extend({
},
forgot_password: function(){
- window.open("http://www.stoneisland.co.uk/pages/forgotten-password", '_system')
+ window.open("http://www.stoneisland.com/pages/forgotten-password", '_system')
},
validate_presence: {
diff --git a/StoneIsland/www/js/lib/blogs/ArchiveView.js b/StoneIsland/www/js/lib/blogs/ArchiveView.js
index 5a024ac9..12aaf7de 100755
--- a/StoneIsland/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/www/js/lib/blogs/ArchiveView.js
@@ -112,6 +112,9 @@ var ArchiveView = ScrollableView.extend({
}.bind(this))
this.deferRefresh()
+ setTimeout(function(){
+ this.deferScrollToTop()
+ }.bind(this), 100)
},
// ['transformProp'] = "translateZ(0) translateX(-50%) translateY(-50%) ";
diff --git a/StoneIsland/www/js/lib/nav/AddressView.js b/StoneIsland/www/js/lib/nav/AddressView.js
index ad5745fb..4a05c4b6 100755
--- a/StoneIsland/www/js/lib/nav/AddressView.js
+++ b/StoneIsland/www/js/lib/nav/AddressView.js
@@ -7,6 +7,7 @@ var AddressView = SerializableView.extend({
events: {
"change [name=Province]": 'update_country',
+ "focus [name]": 'scroll_up_to_phone',
},
initialize: function(opt){
@@ -55,6 +56,10 @@ var AddressView = SerializableView.extend({
this.$(".country-label").html("UNITED STATES")
}
},
+
+ scroll_up_to_phone: function(e){
+ app.view.scroller && app.view.scroller.scrollTo(0, -$(e.currentTarget).position().top)
+ },
})
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 3745f563..a3b32988 100755
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -83,6 +83,8 @@ var CollectionView = ScrollableView.extend({
this.$loader.hide()
this.$content.empty()
// DefaultCode10
+// data.SearchResponseFull.Results.Items.length = 1
+ this.$content.toggleClass("single", (data.SearchResponseFull.Results.Items.length == 1))
data.SearchResponseFull.Results.Items.forEach(this.append.bind(this))
this.deferScrollToTop()
}
diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js
index cb9a0c5a..9ce4a1f3 100755
--- a/StoneIsland/www/js/lib/products/ProductView.js
+++ b/StoneIsland/www/js/lib/products/ProductView.js
@@ -26,6 +26,7 @@ var ProductView = ScrollableView.extend({
this.$body = this.$(".body")
this.$fit = this.$(".fit")
this.$sizing = this.$(".sizing")
+ this.$style = this.$(".style")
},
show: function(){
@@ -124,10 +125,12 @@ var ProductView = ScrollableView.extend({
var default_color_id = this.populate_selectors(data, details)
if (this.not_available) {
+ this.$style.css("opacity", 0)
this.$color.html("NOT AVAILABLE")
this.$size.hide()
}
else {
+ this.$style.css("opacity", 1)
var color = this.colors[default_color_id]
var color_label = color.label
var sizes = this.find_sizes_for_color(default_color_id)
diff --git a/StoneIsland/www/js/lib/view/Scrollable.js b/StoneIsland/www/js/lib/view/Scrollable.js
index d06ed590..0baff845 100755
--- a/StoneIsland/www/js/lib/view/Scrollable.js
+++ b/StoneIsland/www/js/lib/view/Scrollable.js
@@ -21,7 +21,7 @@ var ScrollableView = View.extend({
scrollToTop: function(){
this.scroller.refresh()
- app.collection.scroller.scrollTo(0, 0)
+ this.scroller.scrollTo(0, 0)
},
}) \ No newline at end of file