From 1111498b0091a06fd6083d4fcace9a40ce83d9c5 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 23 Oct 2018 19:17:20 +0200 Subject: [PATCH] wait #2299 @0:20 --- js/libs/fluidbook/fluidbook.search.js | 14 ++++++++++---- style/fluidbook.less | 6 ++++++ style/mmenu/mmenu.less | 7 +++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.search.js b/js/libs/fluidbook/fluidbook.search.js index f76cb1e8..cdc55f26 100644 --- a/js/libs/fluidbook/fluidbook.search.js +++ b/js/libs/fluidbook/fluidbook.search.js @@ -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); diff --git a/style/fluidbook.less b/style/fluidbook.less index d90583e1..61aa35a4 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1634,7 +1634,13 @@ form input[type="text"], form input[type="email"] { .hits { left: -50px; } + &.singlemode { + .hits { + left: 0px; + } + } } + &.right { .hits { left: 50px; diff --git a/style/mmenu/mmenu.less b/style/mmenu/mmenu.less index 0a29f4ad..1e2caa78 100644 --- a/style/mmenu/mmenu.less +++ b/style/mmenu/mmenu.less @@ -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 { } -- 2.39.5