First fixes for Movie Editor. Testing to see if this approach could work.

This commit is contained in:
Leonardo Galli 2017-02-25 12:00:23 +01:00
parent ca164c2a24
commit cdca4a8585
3 changed files with 12 additions and 3 deletions

View File

@ -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);
}
});
});

View File

@ -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;

View File

@ -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;