diff options
Diffstat (limited to 'StoneIsland/www/js/lib/blogs/StoryView.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/StoryView.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js index 808a28b5..5a7a56d1 100755 --- a/StoneIsland/www/js/lib/blogs/StoryView.js +++ b/StoneIsland/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() }, |
