]> _ Git - fluidbook-html5.git/commitdiff
wait #5309 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Jun 2022 14:47:37 +0000 (16:47 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Jun 2022 14:47:37 +0000 (16:47 +0200)
_index.html
js/libs/cube/util.js
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.share.js
js/main.js

index cf5379e5fd7c6f8e092d9d254f7ea7616586b575..78f21d510e00076a82373d0780ec1fb2bcb3a027 100644 (file)
@@ -61,7 +61,7 @@
         <nav id="horizontalNav" role="navigation"></nav>
         <nav id="menu" aria-hidden="true"></nav>
         <div id="search"></div>
-        <a id="logo" href="#" aria-hidden="true" tabindex="-1"></a>
+        <a id="logo" aria-hidden="true" tabindex="-1"></a>
     </header>
     <nav role="navigation" id="interface"></nav>
     <div id="helpView"></div>
index a4b01d2d84f7c77c0a6c24e1533e25a66e133113..5fc52e81e0ea5b6edb420b0aa4f2f8f668f2229a 100644 (file)
@@ -357,4 +357,4 @@ window.clearRequestTimeout = function(handle) {
     "undefined" != typeof exports && (exports.sprintf = y, exports.vsprintf = e), "undefined" != typeof window && (window.sprintf = y, window.vsprintf = e, "function" == typeof define && define.amd && define(function () {
         return {sprintf: y, vsprintf: e}
     }))
-}();
\ No newline at end of file
+}();
index 2149be6ce553d3c2dbd2169b4440fad5a8f79c99..937fa47f99c7f9d85d5177515a7fbe1a72724772 100644 (file)
@@ -182,6 +182,21 @@ Fluidbook.prototype = {
         }
     },
 
+    initEvents: function () {
+        var $this = this;
+        $(document).on(this.input.clickEvent, '.lazy', function () {
+            return false;
+        });
+
+        if (this.settings.url_link !== '' && this.settings.url_link !== 'http://' && this.settings.url_link !== 'https://') {
+            $("#logo").attr('href', '#');
+            $(document).on(this.input.clickEvent, '#logo', function () {
+                $this.clickLogo();
+                return false;
+            });
+        }
+    },
+
     initSettings: function (settings) {
         this.settings = settings;
         //
@@ -730,10 +745,6 @@ Fluidbook.prototype = {
         return this.physicalToVirtual(physical);
     },
     clickLogo: function () {
-        if (this.settings.url_link == '' || this.settings.url_link == 'http://') {
-            return;
-        }
-
         if (this.settings.url_link.indexOf('#') === 0) {
             window.location.hash = this.settings.url_link;
         } else {
index d99ef207e138f9d1d6945891d5a169c1a27e0671..1c747f8a8616cbafa0e71db279706961603a54ea 100644 (file)
@@ -301,8 +301,7 @@ FluidbookShare.prototype = {
         if (body !== '') {
             mailtoParams.push('body=' + body);
         }
-        var mailto = 'mailto:?' + mailtoParams.join('&');
-        window.location = mailto;
+        window.location = 'mailto:?' + mailtoParams.join('&');
         this.fluidbook.stats.track(5);
     },
 
index 5ba9e6d44415a52ad9b389a7a427045c369790e4..fab799cc6673407257abd46d28a09540506a63dd 100644 (file)
@@ -305,6 +305,8 @@ try {
             });
         }
 
+
+
         $(window).on('hashchange', function () {
             if (maskHashChange) {
                 return;
@@ -390,11 +392,7 @@ try {
 
         });
 
-        $("#logo").click(clickLogo);
-
-        $(document).on(this.fluidbook.input.clickEvent, '.lazy', function () {
-            return false;
-        });
+        fluidbook.initEvents();
 
         $(document).trigger('fluidbook.ready');
 
@@ -473,11 +471,6 @@ function goPreviousPage(e) {
     return false;
 }
 
-function clickLogo() {
-    fluidbook.clickLogo();
-    return false;
-}
-
 function preloadBackground(page, resolution) {
     fluidbook.preloadBackground(page, resolution);
 }