mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-09 08:25:03 +02:00
Add the ability to specify the client-side data cache prefix, to avoid collisions in applications where there can be more than one type of data
This commit is contained in:
@ -179,6 +179,16 @@ var et2_dataview_controller = Class.extend({
|
||||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the data cache prefix
|
||||
* The default is to use appname, but if you need to set it explicitly to
|
||||
* something else to avoid conflicts. Use the same prefix everywhere for
|
||||
* each type of data. eg. infolog for infolog entries, even if accessed via addressbook
|
||||
*/
|
||||
setPrefix: function(prefix) {
|
||||
this.dataStorePrefix = prefix;
|
||||
},
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS -- */
|
||||
|
||||
@ -427,6 +437,10 @@ var et2_dataview_controller = Class.extend({
|
||||
"start": query.start,
|
||||
"count": query.num_rows,
|
||||
};
|
||||
if(this.dataStorePrefix)
|
||||
{
|
||||
ctx.prefix = this.dataStorePrefix;
|
||||
}
|
||||
|
||||
// Call the callback
|
||||
this._dataProvider.dataFetch(query, this._fetchCallback, ctx);
|
||||
|
Reference in New Issue
Block a user