I'm working on handling transport.update as a function function that writes the values to localStorage rather than a remote server. I can't seem to get the framework to unmark the object as "dirty"... and as a result the transport.update continues to fire on every .sync() call.
I've tried all of the following approaches but the item always retains dirty = true.
manually marking dirty = false:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
var theTask = ds.get(options.data.id);
theTask.dirty = false;
options.success(theTask);
}
}
returning the raw data:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
options.success(options.data);
}
}
returning nothing:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
}
}
I've tried all of the following approaches but the item always retains dirty = true.
manually marking dirty = false:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
var theTask = ds.get(options.data.id);
theTask.dirty = false;
options.success(theTask);
}
}
returning the raw data:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
options.success(options.data);
}
}
returning nothing:
transport{
update: function (options) {
localStorage[options.data.id] = kendo.stringify(options.data);
}
}