tweaking and getting ready for refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-02-20 01:00:41 +03:00
parent 7a70c77d9b
commit d88e7072bd

View File

@ -146,6 +146,7 @@ var StoreActions = actions.Actions({
} }
}], }],
prepareStoreToSave: ['- Store/', prepareStoreToSave: ['- Store/',
core.doc` core.doc`
@ -165,13 +166,13 @@ var StoreActions = actions.Actions({
}, },
} }
`, `,
function(query, data){ function(query){
var defaults = this.parseStoreQuery() var defaults = this.parseStoreQuery()
query = this.parseStoreQuery(query) query = this.parseStoreQuery(query)
var stores = query.store || defaults.store var stores = query.store || defaults.store
// populate the store... // populate the store...
data = data || {} data = {}
Object.keys(this.stores) Object.keys(this.stores)
// only populate the requested handlers... // only populate the requested handlers...
.filter(function(store){ .filter(function(store){
@ -191,12 +192,19 @@ var StoreActions = actions.Actions({
} }
}], }],
// XXX use query??? // XXX use query???
// XXX should this be the same as .prepareStoreToSave(..)???
prepareStoreToLoad: ['- Store/', prepareStoreToLoad: ['- Store/',
core.doc` core.doc`
NOTE: this can be called multiple times, once per each store. NOTE: this can be called multiple times, once per each store.
NOTE: only one store data set is included per call.`, NOTE: only one store data set is included per call.`,
function(data){ return data || {} }], function(query){ return {} }],
// XXX EXPERIMENTAL STUFF...
// XXX this avoids the .prepareStoreTo*(..) API... // XXX this avoids the .prepareStoreTo*(..) API...
store: ['- Store/', store: ['- Store/',