Commit 59c5baeb by Usman Khalid

Disables the previous/next arrows on pdf books on the first/last pages respectively

parent 01a42925
......@@ -200,6 +200,12 @@ PDFJS.disableWorker = true;
document.getElementById('numPages').textContent = 'of ' + pdfDocument.numPages;
$("#pageNumber").max = pdfDocument.numPages;
$("#pageNumber").val(pageNum);
// Enable/disable the previous/next buttons
if (pageNum > 1) $("#previous").addClass("enabled");
else $("#previous").removeClass("enabled");
if (pageNum < pdfDocument.numPages) $("#next").addClass("enabled");
else $("#next").removeClass("enabled");
}
// Go to previous page
......
......@@ -160,11 +160,11 @@ div.book-wrapper {
@include transition(none);
vertical-align: middle;
width: 100%;
}
&:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
a.enabled:hover {
opacity: 1.0;
filter: alpha(opacity=100);
}
&.last {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment