summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-12-09 11:38:14 +0100
committerJules Laplace <julescarbon@gmail.com>2019-12-09 11:38:14 +0100
commit91eff5910a8a7d55159bdeb0f5b8d4945be0da48 (patch)
treed5d05d79fe4fedf30d6b18fb7b514296fb078a11
parent8d4ace1dbea3b38e08a2fa369cf988eaac5b3dba (diff)
final fixes
-rwxr-xr-xStoneIsland/www/index.html8
-rwxr-xr-xStoneIsland/www/js/lib/blogs/HubView.js8
-rw-r--r--StoneIsland/www/js/lib/etc/accessibility.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js3
-rwxr-xr-xStoneIsland/www/js/lib/products/GalleryView.js12
5 files changed, 20 insertions, 13 deletions
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index f02791f1..67b2038e 100755
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -91,10 +91,10 @@
</div>
<span class="social" role="list" aria-label="Social Links">
- <span role="menuitem" class="fb ion-social-facebook"></span>
- <span role="menuitem" class="insta ion-social-instagram-outline"></span>
- <span role="menuitem" class="tw ion-social-twitter"></span>
- <span role="menuitem" class="yt ion-social-youtube"></span>
+ <span role="menuitem" aria-label="Follow us on Facebook" class="fb ion-social-facebook"></span>
+ <span role="menuitem" aria-label="Follow us on Instagram" class="insta ion-social-instagram-outline"></span>
+ <span role="menuitem" aria-label="Follow us on Twitter" class="tw ion-social-twitter"></span>
+ <span role="menuitem" aria-label="Follow us on Youtube" class="yt ion-social-youtube"></span>
</span>
</div>
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js
index d3b15f77..0d59bcc8 100755
--- a/StoneIsland/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/www/js/lib/blogs/HubView.js
@@ -91,7 +91,7 @@ var HubView = ScrollableView.extend({
})
gallery.on('staticClick', function(e){
var url = gallery.selectedElement.style.backgroundImage.replace(/url\(\"?/,"").replace(/\"?\)/,"")
- app.fullscreenViewer.show(url, url)
+ app.fullscreenViewer.show(url, url, stonewash(row.title))
})
$(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Image gallery, use the arrows to scroll.")
if (accessibility.voiceOver) {
@@ -99,7 +99,7 @@ var HubView = ScrollableView.extend({
$(".gallery-target-" + row.id).click(function(e){
e && e.preventDefault()
var url = gallery.selectedElement.style.backgroundImage.replace(/url\(\"?/,"").replace(/\"?\)/,"")
- app.fullscreenViewer.show(url, url)
+ app.fullscreenViewer.show(url, url, stonewash(row.title))
})
}
}
@@ -134,13 +134,13 @@ var HubView = ScrollableView.extend({
} else {
$(el).click(function(e){
e && e.preventDefault()
- app.fullscreenViewer.show(row.image[0].uri)
+ app.fullscreenViewer.show(row.image[0].uri, row.image[0].uri, stonewash(row.title) + ". Main image")
})
$(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Main image")
$(".gallery-target-" + row.id).attr('aria-label', stonewash(row.title) + ". Main image.")
$(".gallery-target-" + row.id).click(function(e){
e && e.preventDefault()
- app.fullscreenViewer.show(row.image[0].uri)
+ app.fullscreenViewer.show(row.image[0].uri, row.image[0].uri, stonewash(row.title) + ". Main image")
})
}
$t.find(".gallery-left").remove()
diff --git a/StoneIsland/www/js/lib/etc/accessibility.js b/StoneIsland/www/js/lib/etc/accessibility.js
index c66143cc..a18ad5b3 100644
--- a/StoneIsland/www/js/lib/etc/accessibility.js
+++ b/StoneIsland/www/js/lib/etc/accessibility.js
@@ -73,5 +73,5 @@ var accessibility = (function() {
})()
function stonewash (s) {
- return s.replace(/'9/g, '19').replace(/'0/g, '20').replace(/_/g, ' ').replace(/-/g, ' - ').replace(/^[013456789][0-9]+/, '')
+ return s.replace(/'9/g, '19').replace(/'0/g, '20').replace(/_/g, ' ').replace(/-/g, ' - ')
}
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index d3343652..70bb22b4 100755
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -194,9 +194,10 @@ var CollectionView = ScrollableView.extend({
append: function(item, is_single_product){
this.items[ item['Code8'] ] = item
+ console.log("TITLE: " + item['ModelNames'])
var t = this.template.replace(/{{image}}/, sdk.image(item['DefaultCode10'], is_single_product ? '13_f' : '11_f'))
.replace(/{{code8}}/, item['Code8'])
- .replace(/{{title}}/, stonewash(item['ModelNames']))
+ .replace(/{{title}}/g, stonewash(item['ModelNames'] + ' ' + item['MicroCategory']))
var $t = $(t)
if (app.store.ShowProductNameOnCollectionPage) {
var $title = $("<span>")
diff --git a/StoneIsland/www/js/lib/products/GalleryView.js b/StoneIsland/www/js/lib/products/GalleryView.js
index e84caa68..809ba0d9 100755
--- a/StoneIsland/www/js/lib/products/GalleryView.js
+++ b/StoneIsland/www/js/lib/products/GalleryView.js
@@ -36,6 +36,7 @@ var GalleryView = View.extend({
valid_styles[style] = size
}
})
+ this.large_styles = large_styles
Object.keys(valid_styles).sort(sort_image_styles).forEach(function(style){
var id = valid_styles[style] + "_" + style
@@ -57,6 +58,9 @@ var GalleryView = View.extend({
contain: true,
draggable: true,
})
+ if (app.accessible) {
+ gallery.select(1, false, true)
+ }
this.gallery.on('change', function(){
var currentImage = this.gallery.selectedElement.style.backgroundImage.replace(/url\(\"?/,"").replace(/\"?\)/,"")
@@ -85,11 +89,13 @@ var GalleryView = View.extend({
var head = partz[0]
var size = partz[1]
var tail = partz[2]
- var end_partz = tail.split(/\./)
+ var end_partz = (tail || 'f').split(/\./)
var style = end_partz[0]
- var largest_size = large_styles[style]
+ var largest_size = this.large_styles[style]
+ var title = YOOX_IMAGE_STYLE_LABELS[style] || "Alternate view"
var hiresImage = [head, largest_size, tail].join("_")
- app.fullscreenViewer.show(currentImage, hiresImage)
+ console.log(partz, style)
+ app.fullscreenViewer.show(currentImage, hiresImage, title)
},
touchstart: function(e){