1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Manual Import Series selection

Closes #996
This commit is contained in:
Mark McDowall 2016-01-09 13:16:34 -08:00
parent 536aa350f0
commit 2b72c0e328

View File

@ -26,13 +26,8 @@ module.exports = Marionette.Layout.extend({
],
initialize : function() {
var self = this;
this.seriesCollection = SeriesCollection.clone();
_.each(this.seriesCollection.models, function (model) {
model.collection = self.seriesCollection;
});
this._setModelCollection();
this.listenTo(this.seriesCollection, 'row:selected', this._onSelected);
this.listenTo(this, 'modal:afterShow', this._setFocus);
@ -83,6 +78,7 @@ module.exports = Marionette.Layout.extend({
_filter : function (term) {
this.seriesCollection.setFilter(['title', term, 'contains']);
this._setModelCollection();
},
_onSelected : function (e) {
@ -93,5 +89,13 @@ module.exports = Marionette.Layout.extend({
_setFocus : function () {
this.ui.filter.focus();
},
_setModelCollection: function () {
var self = this;
_.each(this.seriesCollection.models, function (model) {
model.collection = self.seriesCollection;
});
}
});
});