X-Git-Url: https://git.mdrn.pl/wl-mobile.git/blobdiff_plain/065d23f9494e1afb7f61ada08b728405b1b7a0cf..91d4143f8e07f469843b2265ce3120bbd64e1fde:/assets/www/js/main.js?ds=inline diff --git a/assets/www/js/main.js b/assets/www/js/main.js index 23eba54..f2c658f 100644 --- a/assets/www/js/main.js +++ b/assets/www/js/main.js @@ -1,7 +1,15 @@ -var VERSION = '1.0'; +/* + * This file is part of WolneLektury-Mobile, licensed under GNU Affero GPLv3 or later. + * Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. + */ + var WL = 'http://www.wolnelektury.pl'; +// disable debugging +//console.log = function(text) {}; + + function onLoad() { console.log('onLoad'); document.addEventListener("deviceready", onDeviceReady, false); @@ -18,8 +26,10 @@ function onDeviceReady() { History.init(function() { console.log('after history.init'); View.init(function() { - Catalogue.sync(function() { - Catalogue.updateLocal(); + Menu.init(function() { + Catalogue.sync(function() { + Catalogue.updateLocal(); + }, error); }, error); }, error); }, error); @@ -53,4 +63,4 @@ var prettySize = function(size) { return Math.round(size*10)/10 + ' ' + unit; } return Math.round(size) + ' ' + unit; -} +};