mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
Add new series will clear results and re-focus search box
This commit is contained in:
parent
0ee82feab7
commit
5d8bc50c77
8 changed files with 49 additions and 40 deletions
26
UI/AddSeries/AddSeriesCollection.js
Normal file
26
UI/AddSeries/AddSeriesCollection.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'Series/SeriesModel'
|
||||
], function (Backbone, SeriesModel) {
|
||||
return Backbone.Collection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/series/lookup',
|
||||
model: SeriesModel,
|
||||
|
||||
parse: function (response) {
|
||||
|
||||
var self = this;
|
||||
|
||||
_.each(response, function (model) {
|
||||
model.id = undefined;
|
||||
|
||||
if (self.unmappedFolderModel) {
|
||||
model.path = self.unmappedFolderModel.get('folder').path;
|
||||
}
|
||||
});
|
||||
|
||||
return response;
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue