mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-28 04:19:59 +00:00
Merge branch 'master' into Develop
This commit is contained in:
commit
decc2a9c79
@ -227,3 +227,14 @@ th {
|
||||
.dark-theme .overlay {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||
.disabled-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide scrollbar for IE, Edge and Firefox */
|
||||
.disabled-scrollbar {
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
@ -69,7 +69,9 @@ var settings = {
|
||||
rotateTimes: 0,
|
||||
fitMode: kthoom.Key.B,
|
||||
theme: "light",
|
||||
direction: 0 // 0 = Left to Right, 1 = Right to Left
|
||||
direction: 0, // 0 = Left to Right, 1 = Right to Left
|
||||
nextPage: 0, // 0 = Reset to Top, 1 = Remember Position
|
||||
scrollbar: 1 // 0 = Hide Scrollbar, 1 = Show Scrollbar
|
||||
};
|
||||
|
||||
kthoom.saveSettings = function() {
|
||||
@ -253,6 +255,7 @@ function updatePage() {
|
||||
}
|
||||
|
||||
$("body").toggleClass("dark-theme", settings.theme === "dark");
|
||||
$("#mainContent").toggleClass("disabled-scrollbar", settings.scrollbar === 0);
|
||||
|
||||
kthoom.setSettings();
|
||||
kthoom.saveSettings();
|
||||
@ -409,6 +412,9 @@ function showPrevPage() {
|
||||
currentImage++;
|
||||
} else {
|
||||
updatePage();
|
||||
if (settings.nextPage === 0) {
|
||||
$("#mainContent").scrollTop(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -419,6 +425,9 @@ function showNextPage() {
|
||||
currentImage--;
|
||||
} else {
|
||||
updatePage();
|
||||
if (settings.nextPage === 0) {
|
||||
$("#mainContent").scrollTop(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -600,6 +609,9 @@ function init(filename) {
|
||||
$("#thumbnails").on("click", "a", function() {
|
||||
currentImage = $(this).data("page") - 1;
|
||||
updatePage();
|
||||
if (settings.nextPage === 0) {
|
||||
$("#mainContent").scrollTop(0);
|
||||
}
|
||||
});
|
||||
|
||||
// Fullscreen mode
|
||||
|
@ -157,6 +157,24 @@
|
||||
<label for="rightToLeft"><input type="radio" id="rightToLeft" name="direction" value="1" /> {{_('Right to Left')}}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{_('Next Page')}}:</th>
|
||||
<td>
|
||||
<div class="inputs">
|
||||
<label for="resetToTop"><input type="radio" id="resetToTop" name="nextPage" value="0" /> {{_('Reset to Top')}}</label>
|
||||
<label for="rememberPosition"><input type="radio" id="rememberPosition" name="nextPage" value="1" /> {{_('Remember Position')}}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{_('Scrollbar')}}:</th>
|
||||
<td>
|
||||
<div class="inputs">
|
||||
<label for="showScrollbar"><input type="radio" id="showScrollbar" name="scrollbar" value="1" /> {{_('Show')}}</label>
|
||||
<label for="hideScrollbar"><input type="radio" id="hideScrollbar" name="scrollbar" value="0" /> {{_('Hide')}}</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user