Commit bbb8f75e authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sven Franck

storages are no longer concatenate to one single file

parent 2dd5aa9e
auto: grunt
check-syntax: grunt
grunt:
make -C ../../grunt/*_gruntJIOStorage > /dev/null 2>&1
var newConflictManagerStorage = function ( spec, my ) { jIO.addStorageType('conflictmanager', function (spec, my) {
spec = spec || {}; spec = spec || {};
var that = my.basicStorage( spec, my ), priv = {}; var that = my.basicStorage( spec, my ), priv = {};
...@@ -903,4 +903,3 @@ var newConflictManagerStorage = function ( spec, my ) { ...@@ -903,4 +903,3 @@ var newConflictManagerStorage = function ( spec, my ) {
return that; return that;
}; };
jIO.addStorageType('conflictmanager', newConflictManagerStorage);
var newCryptedStorage = function ( spec, my ) { jIO.addStorageType('crypt', function (spec, my) {
spec = spec || {}; spec = spec || {};
var that = my.basicStorage( spec, my ), priv = {}; var that = my.basicStorage( spec, my ), priv = {};
...@@ -259,4 +259,3 @@ var newCryptedStorage = function ( spec, my ) { ...@@ -259,4 +259,3 @@ var newCryptedStorage = function ( spec, my ) {
return that; return that;
}; };
jIO.addStorageType('crypt', newCryptedStorage);
var newDAVStorage = function ( spec, my ) { jIO.addStorageType('dav', function ( spec, my ) {
spec = spec || {}; spec = spec || {};
var that = my.basicStorage( spec, my ), priv = {}; var that = my.basicStorage( spec, my ), priv = {};
...@@ -369,4 +369,3 @@ var newDAVStorage = function ( spec, my ) { ...@@ -369,4 +369,3 @@ var newDAVStorage = function ( spec, my ) {
return that; return that;
}; };
jIO.addStorageType('dav', newDAVStorage);
var newIndexStorage = function ( spec, my ) { jIO.addStorageType ('indexed', function (spec, my) {
spec = spec || {}; spec = spec || {};
var that = my.basicStorage( spec, my ), priv = {}; var that = my.basicStorage( spec, my ), priv = {};
...@@ -205,4 +205,3 @@ var newIndexStorage = function ( spec, my ) { ...@@ -205,4 +205,3 @@ var newIndexStorage = function ( spec, my ) {
return that; return that;
}; };
jIO.addStorageType ('indexed', newIndexStorage);
/**
* Adds 6 storages to JIO.
* - LocalStorage ('local')
* - DAVStorage ('dav')
* - ReplicateStorage ('replicate')
* - IndexedStorage ('indexed')
* - CryptedStorage ('crypted')
* - ConflictManagerStorage ('conflictmanager')
*
* @module JIOStorages
*/
(function (jIO, $, Base64, sjcl, hex_sha256) {
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* JIO Local Storage. Type = 'local'. * JIO Local Storage. Type = 'local'.
* Local browser "database" storage. * Local browser "database" storage.
*/ */
var newLocalStorage = function (spec, my) { jIO.addStorageType('local', function (spec, my) {
spec = spec || {}; spec = spec || {};
var that, priv, localstorage; var that, priv, localstorage;
...@@ -335,5 +335,4 @@ var newLocalStorage = function (spec, my) { ...@@ -335,5 +335,4 @@ var newLocalStorage = function (spec, my) {
}; };
return that; return that;
}; });
jIO.addStorageType('local', newLocalStorage);
}(jIO, jQuery, Base64, sjcl, hex_sha256));
var newReplicateStorage = function ( spec, my ) { jIO.addStorageType('replicate', function (spec, my) {
spec = spec || {}; spec = spec || {};
var that = my.basicStorage( spec, my ), priv = {}; var that = my.basicStorage( spec, my ), priv = {};
...@@ -102,4 +102,3 @@ var newReplicateStorage = function ( spec, my ) { ...@@ -102,4 +102,3 @@ var newReplicateStorage = function ( spec, my ) {
return that; return that;
}; };
jIO.addStorageType('replicate', newReplicateStorage);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment