]> _ Git - fluidbook-html5.git/commitdiff
fix #3698 @6
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Jun 2020 18:53:37 +0000 (20:53 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 29 Jun 2020 18:53:37 +0000 (20:53 +0200)
_seo.html
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.share.js

index f7fc9e889baf3c2d371ac63dc290c11c76652bb9..e6e8ce3df80991a2ff41b2042959fc623ef83d5a 100644 (file)
--- a/_seo.html
+++ b/_seo.html
@@ -16,7 +16,7 @@
 </head>
 <body>
 <script>
-    window.location = '../index.html#/page/$page';
+    window.location = '../index.html$page';
 </script>
 $content
 </body>
index 4d4acd06b2a8687f7de917d0a413031d83dea1d0..bfce9abb0f39c6cd3fa0caa8af7414cc03908891 100644 (file)
@@ -38,6 +38,7 @@ FluidbookMenu.prototype = {
     },
 
     _openView: function (view, param1, param2, callback) {
+        console.log(view,param1,param2);
         var $this = this;
         var preload = {
             index: 'thumbnails',
index 627c18dc2caae0dd83a115976c8d4d1801f06249..72adac6fbec2f8c0aafc2b540c3d5abae2f92a1d 100644 (file)
@@ -73,6 +73,7 @@ FluidbookShare.prototype = {
         if (url == undefined || url == 'undefined' || url == null || url == false) {
             url = '';
         }
+        url=url.toString();
         if (url == '') {
             var res = false;
             if (this.fluidbook.support.offline || this.fluidbook.settings.phonegap) {
@@ -157,11 +158,26 @@ FluidbookShare.prototype = {
         return body;
     },
 
-    getSEOArticle: function (title) {
-        if (title.indexOf('article:') === 0) {
-            title = title.substr(8);
+    getSEOArticle: function (id) {
+        id = id.toString();
+        if (id.indexOf('article:') === 0) {
+            id = id.substr(8);
+        }
+
+        if (this.fluidbook.settings.seoArticles[id] !== undefined) {
+            return this.fluidbook.settings.seoArticles[id];
+        }
+        var found = false;
+
+        $.each(this.fluidbook.settings.seoArticles, function (k, v) {
+            if (v.id.toString() === id) {
+                found = v;
+                return false;
+            }
+        });
+        if (found !== false) {
+            return found;
         }
-        return this.fluidbook.settings.seoArticles[title];
     },
 
     getShareLinks: function (hideLabels, url, context) {