mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Manual episode search added to episode details
This commit is contained in:
@@ -3,15 +3,12 @@ define(
|
||||
[
|
||||
'marionette',
|
||||
'Episode/Summary/View',
|
||||
'Episode/Search/Layout',
|
||||
'Release/Collection',
|
||||
'Shared/SpinnerView'
|
||||
], function (Marionette, SummaryView, SearchLayout, ReleaseCollection, SpinnerView) {
|
||||
'Episode/Search/Layout'
|
||||
], function (Marionette, SummaryView, SearchLayout) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Episode/LayoutTemplate',
|
||||
|
||||
|
||||
regions: {
|
||||
summary : '#episode-summary',
|
||||
activity: '#episode-activity',
|
||||
@@ -31,7 +28,6 @@ define(
|
||||
'click .x-episode-search' : '_showSearch'
|
||||
},
|
||||
|
||||
|
||||
onShow: function () {
|
||||
this._showSummary();
|
||||
this._releaseSearchActivated = false;
|
||||
@@ -61,23 +57,8 @@ define(
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (this._releaseSearchActivated) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
this.ui.search.tab('show');
|
||||
this.search.show(new SpinnerView());
|
||||
|
||||
var releases = new ReleaseCollection();
|
||||
var promise = releases.fetchEpisodeReleases(this.model.id);
|
||||
|
||||
promise.done(function () {
|
||||
if (!self.isClosed) {
|
||||
self.search.show(new SearchLayout({collection: releases}));
|
||||
}
|
||||
});
|
||||
this.search.show(new SearchLayout({ model: this.model }));
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user