]> _ Git - fluidbook-html5.git/commitdiff
wait #3234 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 3 Dec 2019 11:39:37 +0000 (12:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 3 Dec 2019 11:39:37 +0000 (12:39 +0100)
js/libs/fluidbook/fluidbook.menu.js
style/fluidbook.less

index 7cbad8cea90cd2f9ffb54ea2ddc52f32641f59a9..45b39c923dec32d1844c19d33f9fbbad87136ad6 100644 (file)
@@ -425,7 +425,16 @@ FluidbookMenu.prototype = {
         var v = this.fluidbook.chapters.getView(submenu);
         var menuId = 'mview-chapters-' + v.sub;
 
-        var view = '<div class="caption">' + this.closeButton() + '<h2>' + v.title + '</h2></div>';
+        var c = '';
+        if (this.fluidbook.datas.chaptersCaptionDisplay === false) {
+            c += ' h0';
+        }
+        var view = '<div class="caption' + c + '">' + this.closeButton();
+        if (this.fluidbook.datas.chaptersCaptionDisplay !== false) {
+            view += '<h2>' + v.title + '</h2>';
+        }
+
+        view += '</div>';
         view += '<div class="content">';
         view += v.view;
         view += '</div>';
@@ -587,6 +596,7 @@ FluidbookMenu.prototype = {
 
         switch (m.data('menu')) {
             case 'chapters':
+                hasCaption = this.fluidbook.datas.chaptersCaptionDisplay !== false;
                 this.fluidbook.datas.chaptersColumns = Math.max(1, Math.min(6, this.fluidbook.datas.chaptersColumns));
                 if (this.fluidbook.datas.chaptersCascade) {
                     this.fluidbook.datas.chaptersColumns = 1;
@@ -599,18 +609,18 @@ FluidbookMenu.prototype = {
                     w = Math.min(450, this.fluidbook.datas.chaptersColMaxWidth);
                 }
                 fullscreen = (w >= ww * 0.9);
-                if(fullscreen){
-                    w=ww;
+                if (fullscreen) {
+                    w = ww;
                 }
                 if (this.fluidbook.datas.chaptersCascade) {
                     h = hh * 0.8;
                     forceHeight = true;
                 }
 
-                if(this.fluidbook.datas.chaptersColumns > 1){
-                    if(w<this.fluidbook.datas.chaptersColMaxWidth * this.fluidbook.datas.chaptersColumns){
+                if (this.fluidbook.datas.chaptersColumns > 1) {
+                    if (w < this.fluidbook.datas.chaptersColMaxWidth * this.fluidbook.datas.chaptersColumns) {
                         $('.mview[data-menu=chapters] ul.chapters').addClass('onecolumn');
-                    }else{
+                    } else {
                         $('.mview[data-menu=chapters] ul.chapters').removeClass('onecolumn');
                     }
                 }
index d592d088c15b8cc4374ccf33a119aa883770a0b9..5ab214d9a82f1c18dab030c182aa8372945343b0 100644 (file)
@@ -1688,6 +1688,11 @@ html.ios body.portrait #interface {
     width: 100%;
     height: 60px;
 
+    &.h0 {
+      height: 0;
+      padding: 0;
+    }
+
     h2 {
       font-size: 16px;
       line-height: 16px;