From e4f7aa52dfcb5e019db2cfd5f158fa8e5f17a19c Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Tue, 10 Jan 2017 15:15:15 +0100 Subject: [PATCH] History now correctly shows movie title. Fixes #92 --- src/UI/Activity/History/HistoryLayout.js | 4 ++-- src/UI/Cells/MovieTitleCell.js | 4 ---- src/UI/Cells/MovieTitleCell2.js | 6 ------ src/UI/Cells/MovieTitleHistoryCell.js | 14 ++++++++++++++ src/UI/Movies/Index/MoviesIndexLayout.js | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 src/UI/Cells/MovieTitleCell2.js create mode 100644 src/UI/Cells/MovieTitleHistoryCell.js diff --git a/src/UI/Activity/History/HistoryLayout.js b/src/UI/Activity/History/HistoryLayout.js index 28e919365..9f9c88f2a 100644 --- a/src/UI/Activity/History/HistoryLayout.js +++ b/src/UI/Activity/History/HistoryLayout.js @@ -2,7 +2,7 @@ var Marionette = require('marionette'); var Backgrid = require('backgrid'); var HistoryCollection = require('./HistoryCollection'); var EventTypeCell = require('../../Cells/EventTypeCell'); -var MovieTitleCell = require('../../Cells/MovieTitleCell'); +var MovieTitleCell = require('../../Cells/MovieTitleHistoryCell'); var EpisodeNumberCell = require('../../Cells/EpisodeNumberCell'); var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell'); var HistoryQualityCell = require('./HistoryQualityCell'); @@ -31,7 +31,7 @@ module.exports = Marionette.Layout.extend({ { name : 'movies', label : 'Movie Title', - cell : MovieTitleCell + cell : MovieTitleCell, }, /*{ name : 'episode', diff --git a/src/UI/Cells/MovieTitleCell.js b/src/UI/Cells/MovieTitleCell.js index 652d1ebf3..8158d6300 100644 --- a/src/UI/Cells/MovieTitleCell.js +++ b/src/UI/Cells/MovieTitleCell.js @@ -4,8 +4,4 @@ module.exports = TemplatedCell.extend({ className : 'series-title-cell', template : 'Cells/SeriesTitleTemplate', - // render : function() { - // this.$el.html(this.model.get("movie").get("title")); //Hack, but somehow handlebar helper does not work. - // return this; - // } }); diff --git a/src/UI/Cells/MovieTitleCell2.js b/src/UI/Cells/MovieTitleCell2.js deleted file mode 100644 index f6fec3a35..000000000 --- a/src/UI/Cells/MovieTitleCell2.js +++ /dev/null @@ -1,6 +0,0 @@ -var TemplatedCell = require('./TemplatedCell'); - -module.exports = TemplatedCell.extend({ - className : 'series-title-cell', - template : 'Cells/SeriesTitleTemplate', -}); diff --git a/src/UI/Cells/MovieTitleHistoryCell.js b/src/UI/Cells/MovieTitleHistoryCell.js new file mode 100644 index 000000000..174d5d361 --- /dev/null +++ b/src/UI/Cells/MovieTitleHistoryCell.js @@ -0,0 +1,14 @@ +var TemplatedCell = require('./TemplatedCell'); + +module.exports = TemplatedCell.extend({ + className : 'series-title-cell', + template : 'Cells/SeriesTitleTemplate', + + + render : function() { + this.$el.html(this.model.get("movie").get("title")); //Hack, but somehow handlebar helper does not work. + debugger; + return this; + + } +}); diff --git a/src/UI/Movies/Index/MoviesIndexLayout.js b/src/UI/Movies/Index/MoviesIndexLayout.js index ec9609ff0..5de35590f 100644 --- a/src/UI/Movies/Index/MoviesIndexLayout.js +++ b/src/UI/Movies/Index/MoviesIndexLayout.js @@ -6,7 +6,7 @@ var ListCollectionView = require('./Overview/SeriesOverviewCollectionView'); var EmptyView = require('./EmptyView'); var MoviesCollection = require('../MoviesCollection'); var InCinemasCell = require('../../Cells/InCinemasCell'); -var MovieTitleCell = require('../../Cells/MovieTitleCell2'); +var MovieTitleCell = require('../../Cells/MovieTitleCell'); var TemplatedCell = require('../../Cells/TemplatedCell'); var ProfileCell = require('../../Cells/ProfileCell'); var MovieLinksCell = require('../../Cells/MovieLinksCell');