]> _ Git - fluidbook-html5.git/commitdiff
Allow local/relative URLs for logo link. WIP #1852 @0.5
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 31 Jan 2018 11:19:59 +0000 (12:19 +0100)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 31 Jan 2018 11:19:59 +0000 (12:19 +0100)
js/libs/fluidbook/fluidbook.js

index b6419e952107821edb5780fa6cfedaf3d0e5637d..686daa373c60c39bdf95f4788b83d82da90bda81 100644 (file)
@@ -331,6 +331,7 @@ Fluidbook.prototype = {
             if (page != $this.currentPage) {
                 $($this).trigger('changePage', [page]);
             }
+            this.landingpage.hide();
             this.menu.closeView(function () {
                 if (page != $this.currentPage) {
                     $this.pageTransition(page);
@@ -782,7 +783,12 @@ Fluidbook.prototype = {
         if (this.datas.url_link == '' || this.datas.url_link == 'http://') {
             return;
         }
-        this.wopen(this.datas.url_link, '_blank');
+
+        if (this.datas.url_link.indexOf('#') === 0) {
+          window.location.hash = this.datas.url_link;
+        } else {
+          this.wopen(this.datas.url_link, '_blank');
+        }
     },
 
     addWaiter: function (reset) {