diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-30 09:59:59 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-08-15 20:02:09 +0200 |
| commit | 62fedc3c15e6bf9bd751f8181baf11036ab9f46b (patch) | |
| tree | fc9a8e17c9cd15b0f06a484309d4c382760006b6 /js/index.js | |
| parent | 8e735e5d779bc2cc451bda6d89339de20a734cdf (diff) | |
| download | wvs-vplan-62fedc3c15e6bf9bd751f8181baf11036ab9f46b.tar.gz wvs-vplan-62fedc3c15e6bf9bd751f8181baf11036ab9f46b.zip | |
Einrückung
Diffstat (limited to 'js/index.js')
| -rw-r--r-- | js/index.js | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/js/index.js b/js/index.js index 90dde6d..8803e47 100644 --- a/js/index.js +++ b/js/index.js @@ -576,6 +576,7 @@ function addPlanAttr(fileEntry, wasdownloaded){ function downloadPdf(link){ var filename = link.substring(link.lastIndexOf("/") + 1); + // FIXME Downloads beim ersten Start erst nach Schließen der App fertig window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, function(fileSystem){ @@ -587,20 +588,20 @@ function downloadPdf(link){ console.log('Datei schon heruntergeladen'); $.mobile.loading('hide'); // Loader verstecken }, - function(err){ - // Datei existiert noch nicht - dirEntry.getFile(filename, {create: true, exclusive: false}, - function(fileEntry){ - var fileTransfer = new FileTransfer(); + function(err){ + // Datei existiert noch nicht + dirEntry.getFile(filename, {create: true, exclusive: false}, + function(fileEntry){ + var fileTransfer = new FileTransfer(); - fileTransfer.download( - link, - fileEntry.toURL(), - function(theFile){ - console.log('Download fertig: ' + theFile.toURL()); - addPlanAttr(theFile, true); + fileTransfer.download( + link, + fileEntry.toURL(), + function(theFile){ + console.log('Download fertig: ' + theFile.toURL()); + addPlanAttr(theFile, true); + }, fail); }, fail); - }, fail); }); }, fail); }); |
