Merge pull request #1037 from geogolem/filterFix2

this seems to make it more stable
This commit is contained in:
geogolem 2017-03-06 09:25:08 -05:00 committed by GitHub
commit 0d60375a56
1 changed files with 18 additions and 4 deletions

View File

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