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;
|
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) {
|
getProperties: function (id) {
|
||||||
var data2;
|
var data2;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -233,7 +221,7 @@ window.arangoCollections = Backbone.Collection.extend({
|
||||||
async: false,
|
async: false,
|
||||||
success: function () {
|
success: function () {
|
||||||
returnval = true;
|
returnval = true;
|
||||||
self.remove(self.getByName(id));
|
self.remove(self.findWhere({name: id}));
|
||||||
window.collectionsView.render();
|
window.collectionsView.render();
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
|
|
Loading…
Reference in New Issue