summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/assets/www/js/lib/blogs
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/blogs')
-rwxr-xr-xStoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js7
-rwxr-xr-xStoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js8
-rwxr-xr-xStoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js14
3 files changed, 22 insertions, 7 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js
index a1863b67..5a036930 100755
--- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js
+++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/ArchiveView.js
@@ -63,9 +63,8 @@ var ArchiveView = ScrollableView.extend({
}.bind(this))
this.back()
- this.deferScrollToTop()
-
this.populateDecade(0, 3)
+ this.deferScrollToTop()
},
populateDecade: function(index, count){
@@ -107,6 +106,8 @@ var ArchiveView = ScrollableView.extend({
$t.removeClass('loading')
}.bind(this))
}.bind(this))
+
+ this.deferRefresh()
},
// ['transformProp'] = "translateZ(0) translateX(-50%) translateY(-50%) ";
@@ -175,13 +176,11 @@ var ArchiveView = ScrollableView.extend({
gray = Math.round( (1-q) * 100 )
opacity = lerp(q, 0.2, 1)
text_opacity = lerp(q, 1, 0.3)
-// console.log("<", gray, opacity)
}
else {
gray = Math.round( q * 100 )
opacity = lerp(q, 1, 0.2)
text_opacity = lerp(q, 0.3, 1)
-// console.log(">", gray, opacity)
}
aa.image.style.WebkitFilter = "grayscale(" + gray + "%)"
aa.image.style.opacity = opacity
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js
index a6c4384b..dae7f98d 100755
--- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js
+++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/HubView.js
@@ -4,7 +4,7 @@ var HubView = ScrollableView.extend({
template: $("#hub .template").html(),
events: {
- "click .share": "content-share",
+ "click .content-share": "share",
"click .store": "store_link",
"click .gallery-left": "gallery_left",
"click .gallery-right": "gallery_right",
@@ -106,8 +106,10 @@ var HubView = ScrollableView.extend({
this.galleries[id].next()
},
- share: function(){
- window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/" )
+ share: function(e){
+ var title = $(e.currentTarget).parent().find(".title").text()
+ console.log("share", title)
+ window.plugins.socialsharing.share(title, null, null, "http://stoneisland.com/" )
},
}) \ No newline at end of file
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js
index 4bf05430..c399a2a9 100755
--- a/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js
+++ b/StoneIsland/platforms/android/assets/www/js/lib/blogs/PageView.js
@@ -1,6 +1,7 @@
var PageView = ScrollableView.extend({
events: {
+ "touchstart a": "follow_link"
},
initialize: function(opt){
@@ -19,6 +20,19 @@ var PageView = ScrollableView.extend({
populate: function(data){
this.$content.html(data.body.replace(/\n/g, "<br>"))
+ this.$content.find("a").each(function(){
+ var href = $(this).attr("href") // .substr(1, "fuck".length-2)
+ if (href.indexOf("“")) {
+ href = href.substr(1, href.length-2)
+ $(this).attr("href", href)
+ }
+ $(this).attr("target", "_system")
+ })
+ },
+
+ follow_link: function(e){
+ var href = $(e.currentTarget).attr("href")
+ window.open(row.link, '_system')
},
}) \ No newline at end of file