mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
updating add existing series to use the common views.
This commit is contained in:
parent
1b55859eb2
commit
3c686808f2
9 changed files with 147 additions and 84 deletions
|
@ -2,13 +2,13 @@
|
|||
define(
|
||||
[
|
||||
'marionette',
|
||||
'AddSeries/Existing/CompositeView',
|
||||
'AddSeries/AddSeriesView',
|
||||
'AddSeries/Existing/UnmappedFolderCollection'
|
||||
], function (Marionette, UnmappedFolderCompositeView, UnmappedFolderCollection) {
|
||||
], function (Marionette, AddSeriesView, UnmappedFolderCollection) {
|
||||
|
||||
return Marionette.CollectionView.extend({
|
||||
|
||||
itemView: UnmappedFolderCompositeView,
|
||||
itemView: AddSeriesView,
|
||||
|
||||
initialize: function () {
|
||||
this.collection = new UnmappedFolderCollection();
|
||||
|
@ -26,14 +26,20 @@ define(
|
|||
_showAndSearch: function (index) {
|
||||
|
||||
var model = this.collection.at(index);
|
||||
|
||||
if (model) {
|
||||
var that = this;
|
||||
var currentIndex = index;
|
||||
var folderName = model.get('folder').name;
|
||||
this.addItemView(model, this.getItemView(), index);
|
||||
$.when(this.children.findByModel(model).search()).then(function () {
|
||||
$.when(this.children.findByModel(model).search({term: folderName})).then(function () {
|
||||
that._showAndSearch(currentIndex + 1);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
itemViewOptions: {
|
||||
isExisting: true
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -20,7 +20,5 @@
|
|||
<div class="row">
|
||||
<div class="x-folder-name-match-results folder-name-matches"/>
|
||||
</div>
|
||||
<div class="text-center new-series-loadmore x-load-more" style="display: none;">
|
||||
<i class="icon-angle-down"/> more
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue