From b1fa3062237aadea6ddeb4c4567f2a319a469409 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 21 Aug 2013 15:26:16 -0700 Subject: [PATCH] Episode details summary has access to series now --- UI/Episode/Layout.js | 7 +++---- UI/Episode/LayoutTemplate.html | 1 - UI/Episode/Summary/Layout.js | 8 ++++++++ UI/Episode/Summary/LayoutTemplate.html | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/UI/Episode/Layout.js b/UI/Episode/Layout.js index 15f819a48..54dfbd231 100644 --- a/UI/Episode/Layout.js +++ b/UI/Episode/Layout.js @@ -36,9 +36,8 @@ define( initialize: function (options) { this.templateHelpers.hideSeriesLink = options.hideSeriesLink; - var series = SeriesCollection.find({ id: this.model.get('seriesId') }); - this.templateHelpers.series = series.toJSON(); - var test = 1; + this.series = SeriesCollection.find({ id: this.model.get('seriesId') }); + this.templateHelpers.series = this.series.toJSON(); }, onShow: function () { @@ -53,7 +52,7 @@ define( } this.ui.summary.tab('show'); - this.summary.show(new SummaryLayout({model: this.model})); + this.summary.show(new SummaryLayout({model: this.model, series: this.series})); }, _showActivity: function (e) { diff --git a/UI/Episode/LayoutTemplate.html b/UI/Episode/LayoutTemplate.html index c93e1f98c..982110d6a 100644 --- a/UI/Episode/LayoutTemplate.html +++ b/UI/Episode/LayoutTemplate.html @@ -3,7 +3,6 @@

- {{debug}} {{#if episodeTitle}} {{title}} - {{EpisodeNumber}} - {{episodeTitle}} diff --git a/UI/Episode/Summary/Layout.js b/UI/Episode/Summary/Layout.js index f47d3ae15..b2ecd2c60 100644 --- a/UI/Episode/Summary/Layout.js +++ b/UI/Episode/Summary/Layout.js @@ -39,6 +39,14 @@ define( } ], + templateHelpers: {}, + + initialize: function (options) { + if (!this.model.series) { + this.templateHelpers.series = options.series.toJSON(); + } + }, + onShow: function () { if (this.model.get('episodeFile')) { this.activity.show(new Backgrid.Grid({ diff --git a/UI/Episode/Summary/LayoutTemplate.html b/UI/Episode/Summary/LayoutTemplate.html index 1263ad98e..a8c765b6c 100644 --- a/UI/Episode/Summary/LayoutTemplate.html +++ b/UI/Episode/Summary/LayoutTemplate.html @@ -1,4 +1,5 @@ 
+ {{debug}} {{#with series}} {{qualityProfile qualityProfileId}} {{network}}