|
|
|
@ -3,7 +3,7 @@ var Marionette = require('marionette');
|
|
|
|
|
var Backgrid = require('backgrid');
|
|
|
|
|
var EmptyView = require('../Index/EmptyView');
|
|
|
|
|
var FullMovieCollection = require ('../FullMovieCollection');
|
|
|
|
|
var MoviesCollection = require('../MoviesCollectionClient');
|
|
|
|
|
var MoviesCollection = require('../MoviesCollection');
|
|
|
|
|
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
|
|
|
|
var DownloadedQualityCell = require('../../Cells/DownloadedQualityCell');
|
|
|
|
|
var ProfileCell = require('../../Cells/ProfileCell');
|
|
|
|
@ -81,7 +81,8 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize : function() {
|
|
|
|
|
this.movieCollection = MoviesCollection;
|
|
|
|
|
this.movieCollection = MoviesCollection.clone();
|
|
|
|
|
this.movieCollection.switchMode('client');
|
|
|
|
|
this.movieCollection.bindSignalR();
|
|
|
|
|
this.movieCollection.fullCollection.bindSignalR();
|
|
|
|
|
|
|
|
|
@ -94,6 +95,7 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
this._showToolbar();
|
|
|
|
|
this._showTable();
|
|
|
|
|
this._showPager();
|
|
|
|
|
window.shownOnce = true;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.listenTo(this.movieCollection.fullCollection, 'sync', function() {
|
|
|
|
@ -156,13 +158,13 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onRender : function() {
|
|
|
|
|
this._showToolbar();
|
|
|
|
|
this._showTable();
|
|
|
|
|
this._showPager();
|
|
|
|
|
if (window.shownOnce){
|
|
|
|
|
this.movieCollection.fetch();
|
|
|
|
|
}
|
|
|
|
|
window.shownOnce = true;
|
|
|
|
|
//this._showToolbar();
|
|
|
|
|
//this._showTable();
|
|
|
|
|
//this._showPager();
|
|
|
|
|
//if (window.shownOnce){
|
|
|
|
|
// this.movieCollection.fetch();
|
|
|
|
|
//}
|
|
|
|
|
//window.shownOnce = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onClose : function() {
|
|
|
|
|