mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-07 09:15:58 +00:00
Tests and cleanup
This commit is contained in:
@@ -94,16 +94,11 @@ define(
|
||||
|
||||
model.set('rootFolderPath', rootFolderPath.get('path'));
|
||||
}
|
||||
|
||||
model.trigger('backgrid:select', model, false);
|
||||
});
|
||||
|
||||
this.ui.monitored.val('noChange');
|
||||
this.ui.qualityProfile.val('noChange');
|
||||
this.ui.seasonFolder.val('noChange');
|
||||
this.ui.rootFolder.val('noChange');
|
||||
|
||||
SeriesCollection.save();
|
||||
|
||||
this.listenTo(SeriesCollection, 'save', this._afterSave);
|
||||
},
|
||||
|
||||
_updateInfo: function () {
|
||||
@@ -145,6 +140,17 @@ define(
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
this.ui.rootFolder.val(options.model.id);
|
||||
this._rootFolderChanged();
|
||||
},
|
||||
|
||||
_afterSave: function () {
|
||||
this.ui.monitored.val('noChange');
|
||||
this.ui.qualityProfile.val('noChange');
|
||||
this.ui.seasonFolder.val('noChange');
|
||||
this.ui.rootFolder.val('noChange');
|
||||
|
||||
SeriesCollection.each(function (model) {
|
||||
model.trigger('backgrid:select', model, false);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -99,11 +99,6 @@ define(
|
||||
]
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(SeriesCollection, 'sync', this._showTable);
|
||||
this.listenTo(SeriesCollection, 'remove', this._showTable);
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this._showToolbar();
|
||||
this._showTable();
|
||||
|
||||
@@ -38,6 +38,7 @@ define(
|
||||
|
||||
this.listenTo(proxy, 'sync', function (proxyModel, models) {
|
||||
this.add(models, { merge: true });
|
||||
this.trigger('save', this);
|
||||
});
|
||||
|
||||
return proxy.save();
|
||||
|
||||
Reference in New Issue
Block a user