2
0
Fork 0

Fixed sqllite open and updated readme

This commit is contained in:
Willem 2016-01-24 22:03:24 +01:00
parent 625f6bfca3
commit 93283b4801
2 changed files with 9 additions and 8 deletions

View file

@ -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 <repro-url>
* 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.

View file

@ -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();