From 74ac46be0a0ca4baf104696cc0c10afdcd12757b Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 21 Jan 2016 03:21:34 +0100 Subject: storyview fix --- .../platforms/ios/www/js/lib/blogs/StoryView.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js index 808a28b5..5a7a56d1 100755 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/StoryView.js @@ -23,7 +23,7 @@ var StoryView = ScrollableView.extend({ this.deferScrollToTop() app.footer.hide() document.body.className = "story" - if (! this.populated) { + if (! this.loaded) { this.populate( BACKUP_DB.story ) } }, @@ -55,18 +55,21 @@ var StoryView = ScrollableView.extend({ }, set_active: function(id){ - this.$links.find(".active").removeClass("active") - this.$links.find("[data-id=" + id + "]").addClass("active") + this.$(".active").removeClass("active") - this.$content.find(".active").removeClass("active") + this.$links.find("[data-id=" + id + "]").addClass("active") this.$content.find("[data-id=" + id + "]").addClass("active") var section = this.sections[id] - var $replace = this.$img - this.$img.fadeTo(110,0.65, function() { - $replace.attr("src", section.image.uri) - }).fadeTo(130,1) + if (navigator.onLine) { + var $replace = this.$img + + this.$img.stop().fadeTo(110,0.65, function() { + $replace.attr("src", section.image.uri) + }).fadeTo(130,1) + } + this.deferScrollToTop() }, -- cgit v1.2.3-70-g09d2