[build][xs]: build latest.
This commit is contained in:
parent
64af7b2150
commit
4eb68fbf0f
19
dist/recline.dataset.js
vendored
19
dist/recline.dataset.js
vendored
@ -499,11 +499,7 @@ my.Query = Backbone.Model.extend({
|
||||
var ourfilter = JSON.parse(JSON.stringify(filter));
|
||||
// not fully specified so use template and over-write
|
||||
if (_.keys(filter).length <= 3) {
|
||||
ourfilter = _.extend(
|
||||
// crude deep copy
|
||||
JSON.parse(JSON.stringify(this._filterTemplates[filter.type])),
|
||||
ourfilter
|
||||
);
|
||||
ourfilter = _.defaults(ourfilter, this._filterTemplates[filter.type]);
|
||||
}
|
||||
var filters = this.get('filters');
|
||||
filters.push(ourfilter);
|
||||
@ -820,12 +816,15 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
|
||||
};
|
||||
|
||||
this.transform = function(editFunc) {
|
||||
var toUpdate = recline.Data.Transform.mapDocs(this.data, editFunc);
|
||||
// TODO: very inefficient -- could probably just walk the documents and updates in tandem and update
|
||||
_.each(toUpdate.updates, function(record, idx) {
|
||||
self.data[idx] = record;
|
||||
var dfd = $.Deferred();
|
||||
// TODO: should we clone before mapping? Do not see the point atm.
|
||||
self.data = _.map(self.data, editFunc);
|
||||
// now deal with deletes (i.e. nulls)
|
||||
self.data = _.filter(self.data, function(record) {
|
||||
return record != null;
|
||||
});
|
||||
return this.save(toUpdate);
|
||||
dfd.resolve();
|
||||
return dfd.promise();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
19
dist/recline.js
vendored
19
dist/recline.js
vendored
@ -1171,12 +1171,15 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {};
|
||||
};
|
||||
|
||||
this.transform = function(editFunc) {
|
||||
var toUpdate = recline.Data.Transform.mapDocs(this.data, editFunc);
|
||||
// TODO: very inefficient -- could probably just walk the documents and updates in tandem and update
|
||||
_.each(toUpdate.updates, function(record, idx) {
|
||||
self.data[idx] = record;
|
||||
var dfd = $.Deferred();
|
||||
// TODO: should we clone before mapping? Do not see the point atm.
|
||||
self.data = _.map(self.data, editFunc);
|
||||
// now deal with deletes (i.e. nulls)
|
||||
self.data = _.filter(self.data, function(record) {
|
||||
return record != null;
|
||||
});
|
||||
return this.save(toUpdate);
|
||||
dfd.resolve();
|
||||
return dfd.promise();
|
||||
};
|
||||
};
|
||||
|
||||
@ -1880,11 +1883,7 @@ my.Query = Backbone.Model.extend({
|
||||
var ourfilter = JSON.parse(JSON.stringify(filter));
|
||||
// not fully specified so use template and over-write
|
||||
if (_.keys(filter).length <= 3) {
|
||||
ourfilter = _.extend(
|
||||
// crude deep copy
|
||||
JSON.parse(JSON.stringify(this._filterTemplates[filter.type])),
|
||||
ourfilter
|
||||
);
|
||||
ourfilter = _.defaults(ourfilter, this._filterTemplates[filter.type]);
|
||||
}
|
||||
var filters = this.get('filters');
|
||||
filters.push(ourfilter);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user