mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
Manual episode search added to episode details
This commit is contained in:
parent
ffda032751
commit
6f949dd129
15 changed files with 191 additions and 84 deletions
|
@ -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 }));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue