|
|
@ -5,6 +5,7 @@ var RootFolderLayout = require('./RootFolders/RootFolderLayout');
|
|
|
|
var ExistingMoviesCollectionView = require('./Existing/AddExistingMovieCollectionView');
|
|
|
|
var ExistingMoviesCollectionView = require('./Existing/AddExistingMovieCollectionView');
|
|
|
|
var AddMoviesView = require('./AddMoviesView');
|
|
|
|
var AddMoviesView = require('./AddMoviesView');
|
|
|
|
var ProfileCollection = require('../Profile/ProfileCollection');
|
|
|
|
var ProfileCollection = require('../Profile/ProfileCollection');
|
|
|
|
|
|
|
|
var ListCollection = require("../Settings/NetImport/NetImportCollection");
|
|
|
|
var RootFolderCollection = require('./RootFolders/RootFolderCollection');
|
|
|
|
var RootFolderCollection = require('./RootFolders/RootFolderCollection');
|
|
|
|
require('../Movies/MoviesCollection');
|
|
|
|
require('../Movies/MoviesCollection');
|
|
|
|
|
|
|
|
|
|
|
@ -30,6 +31,13 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
RootFolderCollection.fetch().done(function() {
|
|
|
|
RootFolderCollection.fetch().done(function() {
|
|
|
|
RootFolderCollection.synced = true;
|
|
|
|
RootFolderCollection.synced = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
this.templateHelpers = {}
|
|
|
|
|
|
|
|
this.listCollection = new ListCollection();
|
|
|
|
|
|
|
|
this.templateHelpers.lists = this.listCollection.toJSON();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.listenTo(this.listCollection, 'all', this._listsUpdated);
|
|
|
|
|
|
|
|
this.listCollection.fetch();
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
_toggleExisting : function(e) {
|
|
|
|
_toggleExisting : function(e) {
|
|
|
@ -44,6 +52,11 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
this.workspace.show(new AddMoviesView());
|
|
|
|
this.workspace.show(new AddMoviesView());
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_listsUpdated : function() {
|
|
|
|
|
|
|
|
this.templateHelpers.lists = this.listCollection.toJSON();
|
|
|
|
|
|
|
|
this.render();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
_folderSelected : function(options) {
|
|
|
|
_folderSelected : function(options) {
|
|
|
|
vent.trigger(vent.Commands.CloseModalCommand);
|
|
|
|
vent.trigger(vent.Commands.CloseModalCommand);
|
|
|
|
this.workspace.show(new ExistingMoviesCollectionView({ model : options.model }));
|
|
|
|
this.workspace.show(new ExistingMoviesCollectionView({ model : options.model }));
|
|
|
|