Add new series will clear results and re-focus search box

This commit is contained in:
Mark McDowall 2013-09-28 23:29:52 -07:00
parent 0ee82feab7
commit 5d8bc50c77
8 changed files with 49 additions and 40 deletions

View 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;
}
});
});