mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-10 15:30:25 +01:00
Now sending _lastModification
This commit is contained in:
parent
23b1e10927
commit
f6484aa626
@ -49,7 +49,7 @@ var et2_dataview_controller = Class.extend({
|
|||||||
|
|
||||||
// "lastModified" contains the last timestap which was returned from the
|
// "lastModified" contains the last timestap which was returned from the
|
||||||
// server.
|
// server.
|
||||||
this._lastModified = null;
|
this._lastModification = null;
|
||||||
|
|
||||||
// Register the dataFetch callback
|
// Register the dataFetch callback
|
||||||
this._grid.setDataCallback(this._gridCallback, this);
|
this._grid.setDataCallback(this._gridCallback, this);
|
||||||
@ -72,7 +72,7 @@ var et2_dataview_controller = Class.extend({
|
|||||||
|
|
||||||
// Require that range from the server
|
// Require that range from the server
|
||||||
this._queueFetch(range.top, range.bottom - range.top + 1,
|
this._queueFetch(range.top, range.bottom - range.top + 1,
|
||||||
this._lastModified !== null);
|
this._lastModification !== null);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +81,7 @@ var et2_dataview_controller = Class.extend({
|
|||||||
reset: function () {
|
reset: function () {
|
||||||
// Throw away all internal mappings and reset the timestamp
|
// Throw away all internal mappings and reset the timestamp
|
||||||
this._indexMap = {};
|
this._indexMap = {};
|
||||||
this._lastModified = null;
|
this._lastModification = null;
|
||||||
|
|
||||||
// Clear the grid
|
// Clear the grid
|
||||||
this._grid.clear();
|
this._grid.clear();
|
||||||
@ -226,7 +226,7 @@ var et2_dataview_controller = Class.extend({
|
|||||||
var query = { "start": _start, "num_rows": _numRows, "refresh": _refresh };
|
var query = { "start": _start, "num_rows": _numRows, "refresh": _refresh };
|
||||||
|
|
||||||
// Call the callback
|
// Call the callback
|
||||||
this._dataProvider.dataFetch(query, this._lastModified,
|
this._dataProvider.dataFetch(query, this._lastModification,
|
||||||
this._fetchCallback, ctx);
|
this._fetchCallback, ctx);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -401,6 +401,9 @@ var et2_dataview_controller = Class.extend({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy the last modification
|
||||||
|
this.self._lastModification = _response.lastModification;
|
||||||
|
|
||||||
// Make sure _response.order.length is not longer than the requested
|
// Make sure _response.order.length is not longer than the requested
|
||||||
// count
|
// count
|
||||||
var order = _response.order.splice(0, this.count);
|
var order = _response.order.splice(0, this.count);
|
||||||
|
@ -62,7 +62,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
|
|||||||
setFilters: function (_filters) {
|
setFilters: function (_filters) {
|
||||||
// Update the filters, reset the "lastModification"
|
// Update the filters, reset the "lastModification"
|
||||||
this._filters = _filters;
|
this._filters = _filters;
|
||||||
this._lastModified = null;
|
this._lastModification = null;
|
||||||
|
|
||||||
// Trigger an update
|
// Trigger an update
|
||||||
this.update();
|
this.update();
|
||||||
|
Loading…
Reference in New Issue
Block a user