summaryrefslogtreecommitdiff
path: root/StoneIsland
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-12-01 06:50:01 -0500
committerJules Laplace <jules@okfoc.us>2015-12-01 06:50:01 -0500
commitd6910087feae6cd30141a615f2de753c37af14b8 (patch)
treea12f5a12429abe185c38cb88b5edbb63d6fb468b /StoneIsland
parent1dfdbf6d09c6b1b80011b98436daa010f10a7be3 (diff)
youtube links from play button
Diffstat (limited to 'StoneIsland')
-rw-r--r--StoneIsland/www/js/lib/blogs/HubView.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/StoneIsland/www/js/lib/blogs/HubView.js b/StoneIsland/www/js/lib/blogs/HubView.js
index 87f8127e..49c05ff6 100644
--- a/StoneIsland/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/www/js/lib/blogs/HubView.js
@@ -8,12 +8,13 @@ var HubView = ScrollableView.extend({
"click .store": "store_link",
"click .gallery-left": "gallery_left",
"click .gallery-right": "gallery_right",
+ "click .play": "play_video",
},
initialize: function(){
this.$content = this.$(".content")
this.$loader = this.$(".loader")
- this.scroller = new IScroll('#hub', app.iscroll_optionsx)
+ this.scroller = new IScroll('#hub', app.iscroll_options)
},
show: function(){
@@ -71,6 +72,7 @@ var HubView = ScrollableView.extend({
el.style.backgroundImage = "url(" + row.image[0].uri + ")"
el.className = "item"
$(".gallery-" + row.id).append(el)
+ $(".gallery-" + row.id).data("row", row)
// video, append play button
if (row.link.match(/youtube|youtu.be|vimeo/)) {
@@ -90,6 +92,10 @@ 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')
+ },
gallery_left: function(e){
var id = $(e.currentTarget).closest(".hub_item").data('id')