Merge pull request #1037 from geogolem/filterFix2

this seems to make it more stable
pull/2/head
geogolem 8 years ago committed by GitHub
commit 0d60375a56

@ -141,11 +141,23 @@ module.exports = Marionette.Layout.extend({
this.seriesCollection = MoviesCollection.clone(); this.seriesCollection = MoviesCollection.clone();
this.seriesCollection.bindSignalR(); this.seriesCollection.bindSignalR();
var pageSize = parseInt(Config.getValue("pageSize")) || 10; var pageSize = parseInt(Config.getValue("pageSize")) || 10;
this.seriesCollection.setPageSize(pageSize); // this.seriesCollection.setPageSize(pageSize);
//this.listenTo(MoviesCollection, 'sync', function() { //this.listenTo(MoviesCollection, 'sync', function() {
// this.seriesCollection.fetch(); // this.seriesCollection.fetch();
//}); //});
this.listenToOnce(this.seriesCollection, 'sync', function() {
this._showToolbar();
//this._fetchCollection();
if (window.shownOnce) {
//this._fetchCollection();
this._showFooter();
}
window.shownOnce = true;
});
this.listenTo(FullMovieCollection, 'sync', function() { this.listenTo(FullMovieCollection, 'sync', function() {
this._showFooter(); this._showFooter();
}); });
@ -179,6 +191,8 @@ module.exports = Marionette.Layout.extend({
} }
}); });
this.seriesCollection.setPageSize(pageSize);
this.sortingOptions = { this.sortingOptions = {
type : 'sorting', type : 'sorting',
@ -292,7 +306,7 @@ module.exports = Marionette.Layout.extend({
}, },
onShow : function() { onShow : function() {
this.listenToOnce(this.seriesCollection, 'sync', function() { /* this.listenToOnce(this.seriesCollection, 'sync', function() {
this._showToolbar(); this._showToolbar();
//this._fetchCollection(); //this._fetchCollection();
if (window.shownOnce) { if (window.shownOnce) {
@ -301,7 +315,7 @@ module.exports = Marionette.Layout.extend({
} }
window.shownOnce = true; window.shownOnce = true;
}); });
}, */ },
_showTable : function() { _showTable : function() {
this.currentView = new Backgrid.Grid({ this.currentView = new Backgrid.Grid({
@ -310,7 +324,7 @@ module.exports = Marionette.Layout.extend({
className : 'table table-hover' className : 'table table-hover'
}); });
this._showPager(); //this._showPager();
this._renderView(); this._renderView();
}, },

Loading…
Cancel
Save