]> _ Git - fluidbook-html5.git/commitdiff
#wait 5093
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Feb 2022 18:47:09 +0000 (19:47 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 15 Feb 2022 18:47:09 +0000 (19:47 +0100)
js/libs/fluidbook/fluidbook.nav.js
js/main.js

index b2aad6528d28d3d96abe915c3098dcd96ba45cbc..7932cbafe9595e1aa8ec5640b2d680d19d2262c8 100644 (file)
@@ -587,14 +587,16 @@ FluidbookNav.prototype = {
                         $(link).append('<span class="menu-item-title">' + $(link).data('tooltip') + '</span>');
                     }
 
-                    link = $(link).get(0).outerHTML;
+                    link = $(link).get(0);
+                    if(link===null || link===undefined || link==='undefined'){
+                        link='';
+                    }
+                    link=link.outerHTML;
                 } else {
                     // Normal link
                     link = '<a href="' + extraURL + '" target="_blank" rel="noopener">' + linkIcon + '</a>';
                 }
 
-                console.log(link);
-
                 var nav = this.getNavFromType(navType);
                 nav.find('ul').append('<li>' + link + '</li>');
             }
index 3ab0c122fbd087cdc6eb390afafba2778db19f1c..69a331fe5d0dc3366d402a24b9c83d64b31a1416 100644 (file)
@@ -82,10 +82,9 @@ try {
             return;
         }
 
-        navigator.notification.alert(__('This publication is not available offline. To read it, an internet connection is required'),
-            function () {
-                window.location = window.localStorage.getItem('apphome');
-            }, __('An internet connection is required'));
+        navigator.notification.alert(__('This publication is not available offline. To read it, an internet connection is required'), function () {
+            window.location = window.localStorage.getItem('apphome');
+        }, __('An internet connection is required'));
     }
 
     function onAppResume() {
@@ -218,8 +217,7 @@ try {
 
         if (script.readyState) {  //IE
             script.onreadystatechange = function () {
-                if (script.readyState == "loaded" ||
-                    script.readyState == "complete") {
+                if (script.readyState == "loaded" || script.readyState == "complete") {
                     script.onreadystatechange = null;
                     if (callback != undefined) {
                         callback();
@@ -260,6 +258,7 @@ try {
             window.fluidbook = new Fluidbook(SETTINGS);
         } catch (e) {
             console.error('error while loading the fluidbook ' + e.message);
+            console.error(e);
         }
         if (null != gal) {
             fluidbook.gal = gal;