From 16ad14592f10b2fbb0ebd7c62d87e6dfc98d1045 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 29 Mar 2014 12:03:32 +0100 Subject: entferne Überbleibsel des Phonegap-Standardcodes; behebe schwerwiegenden Fehler beim Download des Plans MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/index.js | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'js') diff --git a/js/index.js b/js/index.js index 82350e3..f1f3f18 100644 --- a/js/index.js +++ b/js/index.js @@ -92,7 +92,7 @@ function fail(text){ } function download_pdf(link, id){ - var filename = link.substring(link.lastIndexOf('/') + 1); + var filename = link.substring(link.lastIndexOf("/") + 1); window.requestFileSystem( LocalFileSystem.PERSISTENT, 0, @@ -100,7 +100,7 @@ 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 = "/storage/sdcard0" + fileEntry.fullPath; // !!! TODO Unterstützung anderer Geräte console.log('Pfad: ' + sPath); var fileTransfer = new FileTransfer(); fileEntry.remove(); @@ -227,36 +227,3 @@ function login(){ request.fail(fail); } - -var app = { - // Application Constructor - initialize: function() { - this.bindEvents(); - }, - // Bind Event Listeners - // - // Bind any events that are required on startup. Common events are: - // 'load', 'deviceready', 'offline', and 'online'. - bindEvents: function() { - document.addEventListener('deviceready', this.onDeviceReady, false); - }, - // deviceready Event Handler - // - // The scope of 'this' is the event. In order to call the 'receivedEvent' - // function, we must explicity call 'app.receivedEvent(...);' - onDeviceReady: function() { - app.receivedEvent('deviceready'); - }, - // Update DOM on a Received Event - receivedEvent: function(id) { - /* var parentElement = document.getElementById(id); - var listeningElement = parentElement.querySelector('.listening'); - var receivedElement = parentElement.querySelector('.received'); - - listeningElement.setAttribute('style', 'display:none;'); - receivedElement.setAttribute('style', 'display:block;'); - - */ - console.log('Received Event: ' + id); - } -}; -- cgit v1.3.1