Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
This commit is contained in:
parent
609e2a30e9
commit
733882ac25
2 changed files with 52 additions and 34 deletions
|
@ -985,14 +985,15 @@ var PDFViewerApplication = {
|
|||
}
|
||||
});
|
||||
pdfDocument.getAttachments().then(function(attachments) {
|
||||
var attachmentsView = document.getElementById('attachmentsView');
|
||||
var container = document.getElementById('attachmentsView');
|
||||
self.attachments = new PDFAttachmentView({
|
||||
attachments: attachments,
|
||||
attachmentsView: attachmentsView
|
||||
container: container,
|
||||
attachments: attachments
|
||||
});
|
||||
self.attachments.render();
|
||||
document.getElementById('viewAttachments').disabled = !attachments;
|
||||
|
||||
if (!attachments && !attachmentsView.classList.contains('hidden')) {
|
||||
if (!attachments && !container.classList.contains('hidden')) {
|
||||
self.switchSidebarView('thumbs');
|
||||
}
|
||||
if (attachments &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue