mirror of https://github.com/Radarr/Radarr
Merge pull request #532 from Radarr/patch/add-import-from-list-back
add importfromlist abck
This commit is contained in:
commit
9522bf3095
|
@ -47,6 +47,27 @@ var Collection = PageableCollection.extend({
|
||||||
return proxy.save();
|
return proxy.save();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
importFromList : function(models) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
var proxy = _.extend(new Backbone.Model(), {
|
||||||
|
id : "",
|
||||||
|
|
||||||
|
url : self.url + "/import",
|
||||||
|
|
||||||
|
toJSON : function() {
|
||||||
|
return models;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.listenTo(proxy, "sync", function(proxyModel, models) {
|
||||||
|
this.add(models, { merge : true});
|
||||||
|
this.trigger("save", this);
|
||||||
|
});
|
||||||
|
|
||||||
|
return proxy.save();
|
||||||
|
},
|
||||||
|
|
||||||
filterModes : {
|
filterModes : {
|
||||||
'all' : [
|
'all' : [
|
||||||
null,
|
null,
|
||||||
|
|
Loading…
Reference in New Issue