mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Added search button/menu to series details grid
Also fixed some names to make name navigation easier.
This commit is contained in:
parent
4a3410f85a
commit
7320342123
11 changed files with 120 additions and 11 deletions
|
@ -3,12 +3,12 @@ define(
|
|||
[
|
||||
'marionette',
|
||||
'Episode/Summary/EpisodeSummaryLayout',
|
||||
'Episode/Search/Layout',
|
||||
'Episode/Search/EpisodeSearchLayout',
|
||||
'Series/SeriesCollection'
|
||||
], function (Marionette, SummaryLayout, SearchLayout, SeriesCollection) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Episode/LayoutTemplate',
|
||||
template: 'Episode/EpisodeDetailsLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
summary : '#episode-summary',
|
||||
|
@ -38,11 +38,21 @@ define(
|
|||
|
||||
this.series = SeriesCollection.find({ id: this.model.get('seriesId') });
|
||||
this.templateHelpers.series = this.series.toJSON();
|
||||
this.openingTab = options.openingTab || 'summary'
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this._showSummary();
|
||||
this.searchLayout = new SearchLayout({ model: this.model });
|
||||
|
||||
if (this.openingTab === 'search') {
|
||||
this.searchLayout.startManualSearch = true;
|
||||
this._showSearch();
|
||||
}
|
||||
|
||||
else {
|
||||
this._showSummary();
|
||||
}
|
||||
|
||||
this._setMonitoredState();
|
||||
},
|
||||
|
|
@ -12,7 +12,7 @@ define(
|
|||
], function (App, Marionette, ButtonsView, ManualSearchLayout, ReleaseCollection, SeriesCollection,CommandController, LoadingView) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Episode/Search/LayoutTemplate',
|
||||
template: 'Episode/Search/EpisodeSearchLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
main: '#episode-search-region'
|
||||
|
@ -29,7 +29,13 @@ define(
|
|||
},
|
||||
|
||||
onShow: function () {
|
||||
this._showMainView();
|
||||
if (this.startManualSearch) {
|
||||
this._searchManual();
|
||||
}
|
||||
|
||||
else {
|
||||
this._showMainView();
|
||||
}
|
||||
},
|
||||
|
||||
_searchAuto: function (e) {
|
Loading…
Add table
Add a link
Reference in a new issue