Commit Graph

8 Commits

Author SHA1 Message Date
Jonas Jenwald
b7d1bed463 Add a utility function, for the viewer, that removes null (\x00) characters (issue 6416)
Since some browsers render `null` characters, and others don't, this patch adds a way to remove them to prevent display issues in the viewer UI.

Given that documents may contain very long outlines, I've added a utility function to avoid creating a lot of unnecessary `RegExp` objects.
To avoid any future issues, this utility function is used for both the outline and the attachments.

Fixes 6416.
2015-09-09 23:49:03 +02:00
Jonas Jenwald
94cc731616 Add custom |outlineloaded| and |attachmentsloaded| events to the viewer (bug 1112947) 2015-03-21 17:49:34 +01:00
Tim van der Meij
b72395d5ce Determine filename only once and reduce code for _bindLink 2015-01-28 20:53:03 +01:00
Tim van der Meij
818b7fc306 Add JSDoc comments to PDFAttachmentView 2015-01-28 20:53:02 +01:00
Tim van der Meij
4c6ca1c78f Remove DownloadManager dependency
We can pass it in using the options object. Note that that this also avoids creating a DownloadManager object for each separate link (instead, having only one is enough).
2015-01-28 20:53:01 +01:00
Tim van der Meij
733882ac25 Refactor PDFAttachmentView to be more class-like and to separate functionality into methods 2015-01-28 20:53:00 +01:00
Tim van der Meij
609e2a30e9 Rename DocumentAttachmentsView to PDFAttachmentView 2015-01-28 20:52:59 +01:00
Tim van der Meij
2c19d99a2e Rename document_attachments_view.js to pdf_attachment_view.js 2015-01-28 20:52:22 +01:00