summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-03-29 18:25:18 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:48 +0200
commit9139039b98545523887a407607ac77509e273918 (patch)
tree59cec4198c3147ec053aa6ee96db80c767ee8474 /js
parentfc1e96b179f88032594284a6fb026b3bd04d7f9f (diff)
downloadwvs-vplan-9139039b98545523887a407607ac77509e273918.tar.gz
wvs-vplan-9139039b98545523887a407607ac77509e273918.zip
mache Code platformunabhängiger
Diffstat (limited to 'js')
-rw-r--r--js/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/index.js b/js/index.js
index 3a5605b..4c8f926 100644
--- a/js/index.js
+++ b/js/index.js
@@ -94,7 +94,14 @@ function download_pdf(link, id){
fileSystem.root.getFile(
filename, {create: true, exclusive: false},
function gotFileEntry(fileEntry){
- var sPath = "/storage/sdcard0" + fileEntry.fullPath; // !!! TODO Unterstützung anderer Geräte
+ var sPath;
+
+ if(device.platform == "Android"){
+ sPath = "/storage/sdcard0" + fileEntry.fullPath;
+ }else{
+ sPath = fileEntry.fullPath;
+ }
+
console.log('Pfad: ' + sPath);
var fileTransfer = new FileTransfer();
fileEntry.remove();