diff --git a/app/modules/anpdf/anpdf2.phtml b/app/modules/anpdf/anpdf2.phtml index 649aa2b..f83777d 100644 --- a/app/modules/anpdf/anpdf2.phtml +++ b/app/modules/anpdf/anpdf2.phtml @@ -12,7 +12,9 @@ scale = , url = '', pageRendering = false, - pageNumPending = null; + pageNumPending = null, + nexturl = '', + prevurl = ''; @@ -104,11 +106,11 @@ _tmr.push({id: "1069168", type: "pageView", start: (new Date()).getTime()});
diff --git a/app/pub/scripts/anviewer.js b/app/pub/scripts/anviewer.js index 2d3f276..5b620bd 100644 --- a/app/pub/scripts/anviewer.js +++ b/app/pub/scripts/anviewer.js @@ -35,6 +35,12 @@ function renderPage() { document.getElementById('zoompdf').innerHTML = scale + 'x'; document.getElementById('pdfprogress').innerHTML = 'Приятного чтения ↓'; + + if (typeof prevlink !== 'undefined') + document.getElementById('prevbutton').setAttribute("href", prevlink + '/'+ scale); + + if (typeof nextlink !== 'undefined') + document.getElementById('nextbutton').setAttribute("href", nextlink + '/'+ scale); }