Skip to content

Filmstrip view pagination interfere with PdfJs pagination #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
loftux opened this issue Oct 23, 2013 · 3 comments
Closed

Filmstrip view pagination interfere with PdfJs pagination #27

loftux opened this issue Oct 23, 2013 · 3 comments
Assignees
Labels
Milestone

Comments

@loftux
Copy link
Member

loftux commented Oct 23, 2013

To reproduce

  1. Enable PdfJs in module configuration
  2. Add more than 50 documents to a folder, some must be pdf:s
  3. Switch to filmstrip view
  4. View a pdf
  5. Switch to view a non pdf documents
  6. Try to use document list paginator
    Expected: Navigate to next page
    Actual: PdfJs picks up the navigation request and errors out since there is no pdf loaded, and the page requested doesn't exist.
@ghost ghost assigned loftux Oct 23, 2013
@loftux
Copy link
Member Author

loftux commented Oct 23, 2013

Problem narrowed down to be the use of url hash #page that is also used for document library page navigation.
This leads to

  • The function onWindowHashChange picks up this change
  • When a pdf is loaded in PdfJs it tries to make use of this hage and assumes this is the page that first should be displayed

We can solve this by

  • Create a new page hash called pdfpage. This will however break all existing shortcuts users may have created.
  • Detect that is the documentlibrary page and just skip the use of the page hash. Must then also hide the shortcut button. If we do this, coordingate with PdfJs Viewer support for customizing the toolbar #12 .
  • Just add code that checks if page number picked up from hash is larger than actual pages in pdf. If so, reset to highest available page number.

I've tested the last option, this works, but if you are on page > 1 in the page listings, the display of the pdf starts on a page other than first page.

@loftux
Copy link
Member Author

loftux commented Oct 23, 2013

Further review of the issue and my conclusion is that we should disable the link button for all pages other than document details (or by configuration as in issue #12). For document library it is not possible to link to an individual file so that it is the one displayed in filmstrip view.

@wabson
Copy link
Member

wabson commented Oct 23, 2013

I agree with removing the link button for pages other than document-details. This can be done as part of the implemention of #12.

@loftux loftux closed this as completed in 9d1b385 Oct 24, 2013
wabson added a commit that referenced this issue Oct 28, 2013
…only enabled on the document details page (ref. #27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants