From: Vincent Vanwaelscappel Date: Fri, 12 Jul 2013 16:52:18 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1fc6db9e9666f27737fc7d09195d435e1ca809f3;p=fluidbook-html5.git --- diff --git a/js/libs/fluidbook/fluidbook.nav.js b/js/libs/fluidbook/fluidbook.nav.js index af5de93c..d3120560 100644 --- a/js/libs/fluidbook/fluidbook.nav.js +++ b/js/libs/fluidbook/fluidbook.nav.js @@ -58,13 +58,19 @@ FluidbookNav.prototype = { for (var e in this.fluidbook.datas.navOrder) { var icon = this.fluidbook.datas.navOrder[e]; if (icon == 'home') { - console.log(this.fluidbook.datas.home); + var homeURL = this.fluidbook.datas.home; if (this.fluidbook.datas.home == '%apphome%') { - this.fluidbook.datas.home = decodeURIComponent($_GET.home); + homeURL = decodeURIComponent($_GET.home); } - if (this.fluidbook.datas.home != '') { - this.addLink('nav-home', this.fluidbook.datas.home, 'home', 'home'); + if (homeURL != '') { + this.addLink('nav-home', homeURL, 'home', 'home'); } + + $("#home").click(function() { + console.log('home click'); + window.history.go(-(window.history.length - 1)); + return false; + }); } else if (icon == 'index') { this.addLink('nav-index', '#/index', 'index', 'overview'); } else if (icon == 'chapters') {