From cdca4a8585fd9ba66c3d2d47a5e88e91453b7b6e Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sat, 25 Feb 2017 12:00:23 +0100 Subject: [PATCH] First fixes for Movie Editor. Testing to see if this approach could work. --- src/UI/Movies/Editor/MovieEditorLayout.js | 6 +++--- src/UI/Movies/FullMovieCollection.js | 7 +++++++ src/UI/Movies/Index/MoviesIndexLayout.js | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/UI/Movies/FullMovieCollection.js diff --git a/src/UI/Movies/Editor/MovieEditorLayout.js b/src/UI/Movies/Editor/MovieEditorLayout.js index 4c4a768d6..ecaf3e8d2 100644 --- a/src/UI/Movies/Editor/MovieEditorLayout.js +++ b/src/UI/Movies/Editor/MovieEditorLayout.js @@ -77,7 +77,7 @@ module.exports = Marionette.Layout.extend({ initialize : function() { this.movieCollection = MoviesCollection.clone(); - this.movieCollection.shadowCollection.bindSignalR(); + this.movieCollection.bindSignalR(); this.listenTo(this.movieCollection, 'save', this.render); this.filteringOptions = { @@ -114,7 +114,7 @@ module.exports = Marionette.Layout.extend({ }, _showTable : function() { - if (this.movieCollection.shadowCollection.length === 0) { + if (this.movieCollection.length === 0) { this.seriesRegion.show(new EmptyView()); this.toolbar.close(); return; @@ -156,4 +156,4 @@ module.exports = Marionette.Layout.extend({ this.movieCollection.setFilterMode(mode); } -}); \ No newline at end of file +}); diff --git a/src/UI/Movies/FullMovieCollection.js b/src/UI/Movies/FullMovieCollection.js new file mode 100644 index 000000000..712d1b0c6 --- /dev/null +++ b/src/UI/Movies/FullMovieCollection.js @@ -0,0 +1,7 @@ +var movieCollection = require('./MoviesCollection'); + +var fullCollection = movieCollection.clone(); +fullCollection.bindSignalR(); +fullCollection.state.pageSize = 10000; +fullCollection.fetch({reset : true}); +module.exports = fullCollection; diff --git a/src/UI/Movies/Index/MoviesIndexLayout.js b/src/UI/Movies/Index/MoviesIndexLayout.js index 6917eb418..7748cbda2 100644 --- a/src/UI/Movies/Index/MoviesIndexLayout.js +++ b/src/UI/Movies/Index/MoviesIndexLayout.js @@ -5,6 +5,7 @@ var PosterCollectionView = require('./Posters/SeriesPostersCollectionView'); var ListCollectionView = require('./Overview/SeriesOverviewCollectionView'); var EmptyView = require('./EmptyView'); var MoviesCollection = require('../MoviesCollection'); +var FullMovieCollection = require('../FullMovieCollection'); var InCinemasCell = require('../../Cells/InCinemasCell'); var MovieTitleCell = require('../../Cells/MovieTitleCell'); var TemplatedCell = require('../../Cells/TemplatedCell'); @@ -121,6 +122,7 @@ module.exports = Marionette.Layout.extend({ initialize : function() { this.seriesCollection = MoviesCollection.clone(); this.seriesCollection.bindSignalR(); + this.fullCollection = FullMovieCollection;