summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-03-29 12:03:32 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2016-08-15 19:46:48 +0200
commit16ad14592f10b2fbb0ebd7c62d87e6dfc98d1045 (patch)
treedbe619e473b233060e68257fac3b090153fe959d
parentb5039de37e5e942c384763f5c97d88d04225fd8a (diff)
downloadwvs-vplan-16ad14592f10b2fbb0ebd7c62d87e6dfc98d1045.tar.gz
wvs-vplan-16ad14592f10b2fbb0ebd7c62d87e6dfc98d1045.zip
entferne Überbleibsel des Phonegap-Standardcodes; behebe schwerwiegenden Fehler beim Download des Plans
-rw-r--r--index.html3
-rw-r--r--js/index.js37
2 files changed, 2 insertions, 38 deletions
diff --git a/index.html b/index.html
index fb95c1d..e0c4520 100644
--- a/index.html
+++ b/index.html
@@ -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);
- }
-};