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).
This commit is contained in:
Tim van der Meij 2015-01-27 22:11:04 +01:00
parent 733882ac25
commit 4c6ca1c78f
2 changed files with 6 additions and 5 deletions

View file

@ -988,7 +988,8 @@ var PDFViewerApplication = {
var container = document.getElementById('attachmentsView');
self.attachments = new PDFAttachmentView({
container: container,
attachments: attachments
attachments: attachments,
downloadManager: new DownloadManager()
});
self.attachments.render();
document.getElementById('viewAttachments').disabled = !attachments;