mirror of
https://github.com/Radarr/Radarr
synced 2025-01-01 12:54:21 +00:00
Merge pull request #994 from geogolem/respectPageSizeWithoutReloading
respect the pageSize when initializing the layout
This commit is contained in:
commit
3f05ef810e
2 changed files with 7 additions and 3 deletions
|
@ -12,6 +12,7 @@ var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
|||
var FooterView = require('./MovieEditorFooterView');
|
||||
var GridPager = require('../../Shared/Grid/Pager');
|
||||
require('../../Mixins/backbone.signalr.mixin');
|
||||
var Config = require('../../Config');
|
||||
|
||||
window.shownOnce = false;
|
||||
module.exports = Marionette.Layout.extend({
|
||||
|
@ -81,8 +82,10 @@ module.exports = Marionette.Layout.extend({
|
|||
},
|
||||
|
||||
initialize : function() {
|
||||
this.movieCollection = MoviesCollection.clone();
|
||||
this.movieCollection = MoviesCollection.clone();
|
||||
var pageSize = parseInt(Config.getValue("pageSize")) || 10;
|
||||
this.movieCollection.switchMode('client');
|
||||
this.movieCollection.setPageSize(pageSize);
|
||||
this.movieCollection.bindSignalR();
|
||||
this.movieCollection.fullCollection.bindSignalR();
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ var GridPager = require('../../Shared/Grid/Pager');
|
|||
var FooterModel = require('./FooterModel');
|
||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||
require('../../Mixins/backbone.signalr.mixin');
|
||||
var Config = require('../../Config');
|
||||
|
||||
//var MoviesCollectionClient = require('../MoviesCollectionClient');
|
||||
|
||||
|
@ -139,8 +140,8 @@ module.exports = Marionette.Layout.extend({
|
|||
//this variable prevents us from showing the list before seriesCollection has been fetched the first time
|
||||
this.seriesCollection = MoviesCollection.clone();
|
||||
this.seriesCollection.bindSignalR();
|
||||
|
||||
|
||||
var pageSize = parseInt(Config.getValue("pageSize")) || 10;
|
||||
this.seriesCollection.setPageSize(pageSize);
|
||||
//this.listenTo(MoviesCollection, 'sync', function() {
|
||||
// this.seriesCollection.fetch();
|
||||
//});
|
||||
|
|
Loading…
Reference in a new issue