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