Now sending _lastModification

This commit is contained in:
Andreas Stöckel 2012-03-23 15:04:49 +00:00
parent 23b1e10927
commit f6484aa626
2 changed files with 8 additions and 5 deletions

View File

@ -49,7 +49,7 @@ var et2_dataview_controller = Class.extend({
// "lastModified" contains the last timestap which was returned from the
// server.
this._lastModified = null;
this._lastModification = null;
// Register the dataFetch callback
this._grid.setDataCallback(this._gridCallback, this);
@ -72,7 +72,7 @@ var et2_dataview_controller = Class.extend({
// Require that range from the server
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 () {
// Throw away all internal mappings and reset the timestamp
this._indexMap = {};
this._lastModified = null;
this._lastModification = null;
// Clear the grid
this._grid.clear();
@ -226,7 +226,7 @@ var et2_dataview_controller = Class.extend({
var query = { "start": _start, "num_rows": _numRows, "refresh": _refresh };
// Call the callback
this._dataProvider.dataFetch(query, this._lastModified,
this._dataProvider.dataFetch(query, this._lastModification,
this._fetchCallback, ctx);
},
@ -401,6 +401,9 @@ var et2_dataview_controller = Class.extend({
return;
}
// Copy the last modification
this.self._lastModification = _response.lastModification;
// Make sure _response.order.length is not longer than the requested
// count
var order = _response.order.splice(0, this.count);

View File

@ -62,7 +62,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(
setFilters: function (_filters) {
// Update the filters, reset the "lastModification"
this._filters = _filters;
this._lastModified = null;
this._lastModification = null;
// Trigger an update
this.update();