-
- Loading search results from TheTVDB for your movies, this may take a few minutes.
-
+
+
diff --git a/src/UI/AddMovies/List/AddFromListView.js b/src/UI/AddMovies/List/AddFromListView.js
index 199240007..292d02665 100644
--- a/src/UI/AddMovies/List/AddFromListView.js
+++ b/src/UI/AddMovies/List/AddFromListView.js
@@ -1,8 +1,9 @@
var _ = require('underscore');
var vent = require('vent');
var Marionette = require('marionette');
+var Backgrid = require('backgrid');
var AddFromListCollection = require('./AddFromListCollection');
-//var SearchResultCollectionView = require('./SearchResultCollectionView');
+var AddFromListCollectionView = require('./AddFromListCollectionView');
var AddListView = require("../../Settings/NetImport/Add/NetImportAddItemView");
var EmptyView = require('../EmptyView');
var NotFoundView = require('../NotFoundView');
@@ -10,6 +11,16 @@ var ListCollection = require("../../Settings/NetImport/NetImportCollection");
var ErrorView = require('../ErrorView');
var LoadingView = require('../../Shared/LoadingView');
var AppLayout = require('../../AppLayout');
+var InCinemasCell = require('../../Cells/InCinemasCell');
+var MovieTitleCell = require('../../Cells/MovieTitleCell');
+var TemplatedCell = require('../../Cells/TemplatedCell');
+var ProfileCell = require('../../Cells/ProfileCell');
+var MovieLinksCell = require('../../Cells/MovieLinksCell');
+var MovieActionCell = require('../../Cells/MovieActionCell');
+var MovieStatusCell = require('../../Cells/MovieStatusCell');
+var MovieDownloadStatusCell = require('../../Cells/MovieDownloadStatusCell');
+var DownloadedQualityCell = require('../../Cells/DownloadedQualityCell');
+
var SchemaModal = require('../../Settings/NetImport/Add/NetImportSchemaModal');
module.exports = Marionette.Layout.extend({
@@ -25,6 +36,27 @@ module.exports = Marionette.Layout.extend({
},
+ columns : [
+ {
+ name : 'title',
+ label : 'Title',
+ cell : MovieTitleCell,
+ cellValue : 'this',
+ },
+ {
+ name : 'profileId',
+ label : 'Profile',
+ cell : ProfileCell
+ },
+ {
+ name : 'this',
+ label : 'Links',
+ cell : MovieLinksCell,
+ className : "movie-links-cell",
+ sortable : false,
+ }
+ ],
+
events : {
'click .x-load-more' : '_onLoadMore',
"change .x-list-selection" : "_listSelected",
@@ -46,6 +78,8 @@ module.exports = Marionette.Layout.extend({
this.collection = new AddFromListCollection();
+ this.listenTo(this.collection, 'sync', this._showResults);
+
/*this.listenTo(this.collection, 'sync', this._showResults);
this.resultCollectionView = new SearchResultCollectionView({
@@ -126,7 +160,7 @@ module.exports = Marionette.Layout.extend({
this.fetchResult.show(new LoadingView());
this.currentFetchPromise = this.collection.fetch(
- { data : { profileId : listId} }
+ { data : { listId : listId} }
)
this.currentFetchPromise.fail(function() {
self._showError();
@@ -149,17 +183,16 @@ module.exports = Marionette.Layout.extend({
},
_showResults : function() {
- if (!this.isClosed) {
if (this.collection.length === 0) {
- this.ui.searchBar.show();
- this.searchResult.show(new NotFoundView({ term : this.collection.term }));
+ this.fetchResult.show(new NotFoundView({ term : "" }));
} else {
- this.searchResult.show(this.resultCollectionView);
- if (!this.showingAll) {
- this.ui.loadMore.show();
- }
+ this.fetchResult.show(new Backgrid.Grid({
+ collection : this.collection,
+ columns : this.columns,
+ className : 'table table-hover'
+ }));
}
- }
+
},
_abortExistingSearch : function() {
diff --git a/src/UI/AddMovies/List/ListItemView.js b/src/UI/AddMovies/List/ListItemView.js
new file mode 100644
index 000000000..f93b2778e
--- /dev/null
+++ b/src/UI/AddMovies/List/ListItemView.js
@@ -0,0 +1,22 @@
+var _ = require('underscore');
+var vent = require('vent');
+var AppLayout = require('../../AppLayout');
+var Backbone = require('backbone');
+var Marionette = require('marionette');
+var Config = require('../../Config');
+var Messenger = require('../../Shared/Messenger');
+var AsValidatedView = require('../../Mixins/AsValidatedView');
+
+require('jquery.dotdotdot');
+
+var view = Marionette.ItemView.extend({
+
+ template : 'AddMovies/SearchResultViewTemplate',
+
+
+})
+
+
+AsValidatedView.apply(view);
+
+module.exports = view;
diff --git a/src/UI/AddMovies/List/ListItemViewTemplate.hbs b/src/UI/AddMovies/List/ListItemViewTemplate.hbs
new file mode 100644
index 000000000..70d974ae7
--- /dev/null
+++ b/src/UI/AddMovies/List/ListItemViewTemplate.hbs
@@ -0,0 +1,3 @@
+