]> _ Git - fluidbook-html5.git/commitdiff
wait #4238 @1.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Feb 2021 18:08:53 +0000 (19:08 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Feb 2021 18:08:53 +0000 (19:08 +0100)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js
style/fluidbook.less

index cd48936f432c0b5218dcac4b6c8b68ebaf2bc560..2469c91e6a34fd061e9b7eb2cfe90fc26a399f93 100644 (file)
@@ -146,6 +146,7 @@ Fluidbook.prototype = {
 
     initSettings: function (settings) {
         this.settings = settings;
+        //
         if ($_GET['transition'] != null) {
             var map = {1: 'none', 2: 'slide', 3: 'flip', 4: 'flip3d'};
             this.settings.mobileTransitions = map[$_GET['transition']];
index 27673f7450b6a621566ad4e0d896ca22f7dc8d7d..6fe599f84e406a917981822a90f487b05ba04bfb 100644 (file)
@@ -529,8 +529,8 @@ FluidbookMenu.prototype = {
         this.index.openIndex(title, group, closeAll, callback);
     },
     openArchives: function (title, callback) {
-        var archives = this.getCaption(title);
-        archives += '<div class="image" id="archivesview"><img src="data/images/' + this.fluidbook.settings.externalArchives + '" /><div class="links">' + this.fluidbook.settings.links.archives + '</div></div>';
+        var archives = this.getCaption(title, true, title === undefined || title === '' ? 'h0' : '');
+        archives += '<div class="content"><div class="image" id="archivesview"><img src="data/images/' + this.fluidbook.settings.externalArchives + '" /><div class="links">' + this.fluidbook.settings.links.archives + '</div></div></div>';
         this.viewWrap(archives, 'archives', '', 'archives');
         if (callback != undefined) {
             callback();
@@ -950,6 +950,13 @@ FluidbookMenu.prototype = {
                     console.log(d);
                 }
                 break;
+            case 'archives':
+                if (ww < 600) {
+                    fullscreen = true;
+                } else {
+                    w = Math.min(w, this.fluidbook.settings.filesInfos.archives.width / 1.5);
+                }
+                break;
             default:
                 if (m.data('maxwidth') !== null) {
                     maxWidth = parseInt(m.data('maxwidth'));
@@ -1018,8 +1025,8 @@ FluidbookMenu.prototype = {
         });
 
         if ($("#archivesview").length == 1) {
-            var w = this.fluidbook.settings.filesInfos.archives.width;
-            var ratio = $("#archivesview img").width() / w;
+            var arw = this.fluidbook.settings.filesInfos.archives.width;
+            var ratio = $("#archivesview img").width() / arw;
             $("#archivesview .links").transform({scale: [ratio]});
         }
 
index c0440c129619ceae075796b063a470236f3bf28d..fddb66f3433cc81d0948699e1628b7b206085b26 100644 (file)
@@ -484,12 +484,7 @@ FluidbookNav.prototype = {
                 // Note: the "!" at the beginning of the title/help parameters means that we don't want these strings translated
                 link = this.addLink(navType, 'nav-locales', '#/locales', 'locales', '!' + this.fluidbook.l10n.getCurrentLanguageName(), '!Select Language', 'Control+L');
             } else if (icon === 'archives') {
-                if (this.fluidbook.settings.archivesLink !== '') {
-                    link = this.addLink(navType, 'nav-archives', this.fluidbook.settings.archivesLink, 'archives', '!' + this.fluidbook.settings.archivesLabel, '!' + this.fluidbook.settings.archivesLabel, '');
-                } else if (this.fluidbook.settings.externalArchives !== '') {
-                    link = this.addLink(navType, 'nav-archives', '#/archives', 'archives', '!' + this.fluidbook.settings.archivesLabel, '!' + this.fluidbook.settings.archivesLabel, '');
-                }
-
+                link = this.addLink(navType, 'nav-archives', '#/archives', 'archives', '!' + this.fluidbook.settings.archivesLabel, '!' + this.fluidbook.settings.archivesLabel, '');
             } else if (icon === 'help') {
                 // __('help')
                 link = this.addLink(navType, 'nav-help', '#', 'help', 'help', 'help', 'F1');
index e58c7862ad9ecba67d3c8d9c25b5f7cd6305a104..b2381e4b40c5037caf31ab3b0244b4ce8a1ae7e8 100644 (file)
@@ -224,12 +224,12 @@ body, html {
 /* Desktop devices */
 .using-mouse.msie body:not(.zoom-disabled) {
   #links .container {
-    cursor: url(images/cursors/zoom-in.cur),auto;
+    cursor: url(images/cursors/zoom-in.cur), auto;
   }
 
   &.zoomed {
     #links .container {
-      cursor: url(images/cursors/zoom-out.cur),auto;
+      cursor: url(images/cursors/zoom-out.cur), auto;
     }
   }
 }
@@ -2186,19 +2186,28 @@ ul.chapters.shareList a.level0 .svg-icon {
 
 /* Archives */
 #archivesview {
-  position: relative;
-  overflow: hidden;
-  top: 44px;
-}
+  position:relative;
 
-#archivesview .links {
-  position: absolute;
-  top: 0px;
-  left: 0px;
-}
+  img {
+    position: relative;
+    display: block;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: auto;
+    z-index: 0;
+  }
 
-#archivesview .links .link {
-  position: absolute;
+  .links {
+    z-index: 1;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+
+    .link {
+      position: absolute;
+    }
+  }
 }
 
 /* Inner view */