]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 12 Jul 2013 16:52:18 +0000 (16:52 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 12 Jul 2013 16:52:18 +0000 (16:52 +0000)
js/libs/fluidbook/fluidbook.nav.js

index af5de93c6190c63266aea2d5571a4520e8a6203f..d3120560fb5d1fd73a0e9ca393512ae9d97d5479 100644 (file)
@@ -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') {