]> _ Git - fluidbook-html5.git/commitdiff
wait #2299 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Oct 2018 17:17:20 +0000 (19:17 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 23 Oct 2018 17:17:20 +0000 (19:17 +0200)
js/libs/fluidbook/fluidbook.search.js
style/fluidbook.less
style/mmenu/mmenu.less

index f76cb1e88ac4bb15dd5bd9bcb45a39b64e6a4aec..cdc55f268e159f95b5723b21a13a69ba77d8e1ed 100644 (file)
@@ -6,6 +6,7 @@ function FluidbookSearch(fluidbook) {
     this.highlightEnabled = fluidbook.datas.highlightResults;
     this.resultPages = [];
     this.plugins = [];
+    this.singleMode = fluidbook.singleMode;
 
     this.init();
 }
@@ -143,7 +144,8 @@ FluidbookSearch.prototype = {
                     if (page > maxPage) {
                         continue;
                     }
-                    if ((page % 2) == 1) {
+
+                    if (!this.singleMode && (page % 2) === 1) {
                         page--;
                     }
 
@@ -211,7 +213,8 @@ FluidbookSearch.prototype = {
             if (page > maxPage) {
                 continue;
             }
-            if ((page % 2) == 1) {
+            
+            if (!this.singleMode && (page % 2) === 1) {
                 page--;
             }
 
@@ -339,9 +342,11 @@ FluidbookSearch.prototype = {
         // Test if we highlight results
         if (!this.fluidbook.datas.highlightAllOccurences) {
             var evenPageNumber = pageNr;
-            if (evenPageNumber % 2 == 1) {
+
+            if (!this.singleMode && evenPageNumber % 2 === 1) {
                 evenPageNumber--;
             }
+
             if (this.resultPages.indexOf(evenPageNumber) == -1) {
                 return;
             }
@@ -351,7 +356,8 @@ FluidbookSearch.prototype = {
         if (this.fluidbook.resize.orientation == 'portrait') {
             pageNrs.push(pageNr);
         } else {
-            if (pageNr % 2 == 1) {
+
+            if (!this.singleMode && pageNr % 2 === 1) {
                 pageNr--;
             }
             pageNrs.push(pageNr);
index d90583e1b0cd14756f2a24170ed068b4ca29d5ce..61aa35a429e96677e521aa1ac59e1e71aff88a77 100644 (file)
@@ -1634,7 +1634,13 @@ form input[type="text"], form input[type="email"] {
                        .hits {
                                left: -50px;
                        }
+                       &.singlemode {
+                               .hits {
+                                       left: 0px;
+                               }
+                       }
                }
+
                &.right {
                        .hits {
                                left: 50px;
index 0a29f4ad52a7755728dbd385c86ee4efffcb2b28..1e2caa789e3b7276a74077bd2b7196b1b35e5773 100644 (file)
@@ -335,6 +335,13 @@ html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim] ~ #mm-blocker {
        .doubleThumb {
                display: block !important;
                margin: 0 auto 40px auto !important;
+
+               &.singlemode {
+                       margin: 0px 10px 15px 17px !important;
+                       display: inline-block !important;
+                       vertical-align: top;
+               }
+
                &:not(.simple), &.simple .thumb img {
 
                }