diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 15:18:23 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 15:18:23 +0200 |
| commit | 6f2af841c17ff4ed28d40121114825a40e8cf6fa (patch) | |
| tree | 5cc68e65c61e85ada066e45cf62805b60b24cf67 /StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js | |
| parent | bea0583348a3e7de85d4fed5e7fe206fb90fcc73 (diff) | |
updating rems
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js')
| -rwxr-xr-x | StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js index b072a887..c4ebd716 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js @@ -57,6 +57,8 @@ var HubView = ScrollableView.extend({ .replace(/{{date}}/, moment(row.date).format("MM.DD.YYYY")) .replace(/{{title}}/, row.title) .replace(/{{subtitle}}/, row.subtitle) + .replace(/{{cleantitle}}/, stonewash(row.title)) + .replace(/{{cleansubtitle}}/, stonewash(row.subtitle)) .replace(/{{link}}/, row.link) .replace(/{{body}}/, row.body.replace(/\n/g, "<br>")) var $t = $(t) @@ -71,6 +73,7 @@ var HubView = ScrollableView.extend({ row.image.forEach(function(img){ var el = document.createElement("div") el.style.backgroundImage = "url(" + img.uri + ")" + el.setAttribute('aria-label', img.caption) el.className = "item" $gallery.append(el) }) @@ -107,6 +110,8 @@ var HubView = ScrollableView.extend({ play.className = "play" $(".gallery-" + row.id).append(play) $(".gallery-" + row.id).addClass("gallery-video-post") + $(".gallery-" + row.id).attr('role', 'link') + $(".gallery-" + row.id).attr('aria-label', stonewash(row.title) + ". Watch the video on Youtube") if (! row.image) { var url = row.link var ytid = (url.match(/v=([-_a-zA-Z0-9]{11})/i) || url.match(/youtu.be\/([-_a-zA-Z0-9]{11})/i) || url.match(/embed\/([-_a-zA-Z0-9]{11})/i))[1].split('&')[0]; @@ -125,6 +130,7 @@ var HubView = ScrollableView.extend({ store_link: function(){ app.router.go("store") }, + play_video: function(e){ var row = $(e.currentTarget).closest('.gallery-video-post').data("row") window.open(row.link, '_system') @@ -142,7 +148,9 @@ var HubView = ScrollableView.extend({ share: function(e){ var title = $(e.currentTarget).parent().find(".title").text() console.log("share", title) - window.plugins.socialsharing.share(title, null, null, "http://deeplink.me/www.stoneisland.com/hub" ) + if (window.plugins && window.plugins.socialsharing) { + window.plugins.socialsharing.share(title, null, null, "http://deeplink.me/www.stoneisland.com/hub" ) + } }, }) @@ -169,7 +177,7 @@ var HubLoader = (function(){ if (item.image && item.image.length) { loader = new Loader (HubLoader.build) images = item.image.map(function(img){ - return img.uri.replace("http:","https:") + return img.uri.replace("http:", "https:") }).filter(function(img){ return img.uri }) |
