diff --git a/README.md b/README.md index 082acfd..1165f2a 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ A javascript library providing server defined loading of assets for a single pag The cache types in FFSpaLoader.options.cache.* store different types data; - * meta = Stores server.url and server.assets data. + * meta = Stores the server url and server assets. * js = Store application javascript data. * css = Stores application css data. * cssData = Stores application css large data like base64 fonts/svg/etc. @@ -161,9 +161,9 @@ A javascript library providing server defined loading of assets for a single pag ## Example Application - There is a fully working nodejs example application in the example folder; + There is a nodejs example application in the example folder; - * git clone + * git clone https://bitbucket.org/im_ik/es5-ff-spa-loader.git * cd es5-ff-spa-loader * cd example * npm install @@ -183,6 +183,7 @@ A javascript library providing server defined loading of assets for a single pag * Chromium 46 * Iceweasel 43 + * Firefox Aurora 45 * Opera 12 Presto * IE 11 Edge * Android 5.1.1 in Cordova + Site @@ -192,9 +193,9 @@ A javascript library providing server defined loading of assets for a single pag ## Todo * test in production - * Add Loader progress bar + * Add loader progress bar * Server header check support - * Add table+instance websql options so it can also be used in application code. + * Add instance websql options so it can also be used in application code. * Split assets per type so do js first then boot then css + cssData. * Move css to file ? * Add more tests @@ -216,7 +217,7 @@ Add unit tests for any new or changed functionality. Lint and test your code. * Added more jsdoc. * Added question.size option. * Changed websql option openDatabase to returning open function. -* Fixed sqlitePlugin open function was typo on openDatabase. +* Fixed sqlitePlugin open function was 2x typo on openDatabase. * Added websql table option. (defaults to 'cache_store') * Added clearCache function. * Fixed removed question div on loader error. diff --git a/es5-ff-spa-loader.js b/es5-ff-spa-loader.js index dd47b7d..52c4bfb 100644 --- a/es5-ff-spa-loader.js +++ b/es5-ff-spa-loader.js @@ -21,7 +21,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* jslint browser: true */ -/* global angular,define */ +/* global angular,define,sqlitePlugin */ /** * FFSpaLoader is an assets loader for single page applications. @@ -779,7 +779,7 @@ if (options.cache[type] === null) { if (factory.detect.cordovaDevice() && factory.detect.sqlitePlugin()) { utilDebug('startCacheType auto sqlitePlugin for '+type); - options.cache[type] = factory.cache.websql({open: function(dbOpt) { return rootWindow.sqlitePlugin(dbOpt.name, dbOpt.version, dbOpt.name, dbOpt.size);}}); + options.cache[type] = factory.cache.websql({open: function(dbOpt) { return sqlitePlugin.openDatabase(dbOpt.name, dbOpt.version, dbOpt.name, dbOpt.size);}}); } else if (factory.detect.openDatabase()) { utilDebug('startCacheType auto openDatabase for '+type); options.cache[type] = factory.cache.websql();