diff options
| -rw-r--r-- | index.html | 3 | ||||
| -rw-r--r-- | js/index.js | 37 |
2 files changed, 2 insertions, 38 deletions
@@ -68,9 +68,6 @@ <script type="text/javascript" src="js/jquery.mobile-1.4.2.min.js"></script> <script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="js/index.js"></script> - <script type="text/javascript"> - app.initialize(); - </script> <script type="text/javascript" src="js/pdf.js"></script> </body> </html> 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); - } -}; |
