|
|
@ -12,7 +12,8 @@ var ErrorView = require('../ErrorView');
|
|
|
|
var LoadingView = require('../../Shared/LoadingView');
|
|
|
|
var LoadingView = require('../../Shared/LoadingView');
|
|
|
|
var AppLayout = require('../../AppLayout');
|
|
|
|
var AppLayout = require('../../AppLayout');
|
|
|
|
var InCinemasCell = require('../../Cells/InCinemasCell');
|
|
|
|
var InCinemasCell = require('../../Cells/InCinemasCell');
|
|
|
|
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
|
|
|
var MovieTitleCell = require('../../Cells/MovieListTitleCell');
|
|
|
|
|
|
|
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
|
|
|
var TemplatedCell = require('../../Cells/TemplatedCell');
|
|
|
|
var TemplatedCell = require('../../Cells/TemplatedCell');
|
|
|
|
var ProfileCell = require('../../Cells/ProfileCell');
|
|
|
|
var ProfileCell = require('../../Cells/ProfileCell');
|
|
|
|
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
|
|
|
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
|
|
@ -20,6 +21,7 @@ var MovieActionCell = require('../../Cells/MovieActionCell');
|
|
|
|
var MovieStatusCell = require('../../Cells/MovieStatusCell');
|
|
|
|
var MovieStatusCell = require('../../Cells/MovieStatusCell');
|
|
|
|
var MovieDownloadStatusCell = require('../../Cells/MovieDownloadStatusCell');
|
|
|
|
var MovieDownloadStatusCell = require('../../Cells/MovieDownloadStatusCell');
|
|
|
|
var DownloadedQualityCell = require('../../Cells/DownloadedQualityCell');
|
|
|
|
var DownloadedQualityCell = require('../../Cells/DownloadedQualityCell');
|
|
|
|
|
|
|
|
var MoviesCollection = require('../../Movies/MoviesCollection');
|
|
|
|
|
|
|
|
|
|
|
|
var SchemaModal = require('../../Settings/NetImport/Add/NetImportSchemaModal');
|
|
|
|
var SchemaModal = require('../../Settings/NetImport/Add/NetImportSchemaModal');
|
|
|
|
|
|
|
|
|
|
|
@ -37,6 +39,12 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
columns : [
|
|
|
|
columns : [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name : '',
|
|
|
|
|
|
|
|
cell : SelectAllCell,
|
|
|
|
|
|
|
|
headerCell : 'select-all',
|
|
|
|
|
|
|
|
sortable : false
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
label : 'Title',
|
|
|
@ -60,7 +68,8 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
events : {
|
|
|
|
events : {
|
|
|
|
'click .x-load-more' : '_onLoadMore',
|
|
|
|
'click .x-load-more' : '_onLoadMore',
|
|
|
|
"change .x-list-selection" : "_listSelected",
|
|
|
|
"change .x-list-selection" : "_listSelected",
|
|
|
|
"click .x-fetch-list" : "_fetchList"
|
|
|
|
"click .x-fetch-list" : "_fetchList",
|
|
|
|
|
|
|
|
"click .x-import-selected" : "_importSelected"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
initialize : function(options) {
|
|
|
|
initialize : function(options) {
|
|
|
@ -173,6 +182,21 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
this.render();
|
|
|
|
this.render();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_importSelected : function() {
|
|
|
|
|
|
|
|
var selected = this.importGrid.getSelectedModels();
|
|
|
|
|
|
|
|
console.log(selected);
|
|
|
|
|
|
|
|
_.each(selected, function(elem){
|
|
|
|
|
|
|
|
elem.save();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
/*for (m in selected) {
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
|
|
|
|
m.save()
|
|
|
|
|
|
|
|
MoviesCollection.add(m);
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//MoviesCollection.save();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
_clearResults : function() {
|
|
|
|
_clearResults : function() {
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.isExisting) {
|
|
|
|
if (!this.isExisting) {
|
|
|
@ -186,11 +210,12 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
if (this.collection.length === 0) {
|
|
|
|
if (this.collection.length === 0) {
|
|
|
|
this.fetchResult.show(new NotFoundView({ term : "" }));
|
|
|
|
this.fetchResult.show(new NotFoundView({ term : "" }));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.fetchResult.show(new Backgrid.Grid({
|
|
|
|
this.importGrid = new Backgrid.Grid({
|
|
|
|
collection : this.collection,
|
|
|
|
collection : this.collection,
|
|
|
|
columns : this.columns,
|
|
|
|
columns : this.columns,
|
|
|
|
className : 'table table-hover'
|
|
|
|
className : 'table table-hover'
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
|
|
|
|
this.fetchResult.show(this.importGrid);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|