mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
added release results to episode detail tab
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
define(['app', 'Episode/Summary/View'], function () {
|
||||
define(['app', 'Shared/SpinnerView', 'Episode/Summary/View', 'Episode/Search/Layout', 'Release/Collection'], function () {
|
||||
|
||||
NzbDrone.Episode.Layout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Episode/LayoutTemplate',
|
||||
@@ -27,6 +27,7 @@ define(['app', 'Episode/Summary/View'], function () {
|
||||
|
||||
onShow: function () {
|
||||
this.showSummary();
|
||||
this._releaseSearchActivated = false;
|
||||
},
|
||||
|
||||
|
||||
@@ -53,9 +54,23 @@ define(['app', 'Episode/Summary/View'], function () {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (this._releaseSearchActivated) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
this.ui.search.tab('show');
|
||||
this.search.show(new NzbDrone.Shared.SpinnerView());
|
||||
|
||||
var releases = new NzbDrone.Release.Collection();
|
||||
var promise = releases.fetchEpisodeReleases(this.model.id);
|
||||
|
||||
promise.done(function () {
|
||||
self.search.show(new NzbDrone.Episode.Search.Layout({collection: releases}));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user