mirror of https://gitee.com/bigwinds/arangodb
Frontend: Replaced Jans findWhere replacement with the correct function, which is available after update of backbone
This commit is contained in:
parent
10f4a0f488
commit
b458b0e233
|
@ -116,18 +116,6 @@ window.arangoCollections = Backbone.Collection.extend({
|
|||
return result;
|
||||
},
|
||||
|
||||
getByName: function (name) {
|
||||
// some clumsy replacement for collection.findWhere()
|
||||
var i;
|
||||
|
||||
for (i = 0; i < this.models.length; ++i) {
|
||||
if (this.models[i].get('name') === name) {
|
||||
return this.models[i];
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
|
||||
getProperties: function (id) {
|
||||
var data2;
|
||||
$.ajax({
|
||||
|
@ -233,7 +221,7 @@ window.arangoCollections = Backbone.Collection.extend({
|
|||
async: false,
|
||||
success: function () {
|
||||
returnval = true;
|
||||
self.remove(self.getByName(id));
|
||||
self.remove(self.findWhere({name: id}));
|
||||
window.collectionsView.render();
|
||||
},
|
||||
error: function () {
|
||||
|
|
Loading…
Reference in New Issue