Use open with/save as dialog for fallback and download.

This commit is contained in:
Brendan Dahl 2012-05-08 16:11:50 -07:00
parent 982c7a0f7e
commit c1f73b96a4
3 changed files with 29 additions and 39 deletions

View file

@ -375,9 +375,9 @@ var PDFView = {
},
fallback: function pdfViewDownload() {
var url = this.url.split('#')[0];
if (!PDFJS.isFirefoxExtension)
return; // can't do this with regular viewer
var url = this.url.split('#')[0];
FirefoxCom.request('fallback', url);
},
@ -1359,9 +1359,6 @@ window.addEventListener('load', function webViewerLoad(evt) {
document.getElementById('fileInput').value = null;
}
if (PDFJS.isFirefoxExtension)
document.getElementById('fallback').removeAttribute('hidden');
// Special debugging flags in the hash section of the URL.
var hash = document.location.hash.substring(1);
var hashParams = PDFView.parseQueryString(hash);