|
|
|
@ -6,9 +6,15 @@ define(
|
|
|
|
|
'AddSeries/Existing/UnmappedFolderCollection'
|
|
|
|
|
], function (Marionette, AddSeriesView, UnmappedFolderCollection) {
|
|
|
|
|
|
|
|
|
|
return Marionette.CollectionView.extend({
|
|
|
|
|
return Marionette.CompositeView.extend({
|
|
|
|
|
|
|
|
|
|
itemView: AddSeriesView,
|
|
|
|
|
itemView : AddSeriesView,
|
|
|
|
|
itemViewContainer: '.x-loading-folders',
|
|
|
|
|
template : 'AddSeries/Existing/AddExistingSeriesCollectionViewTemplate',
|
|
|
|
|
|
|
|
|
|
ui: {
|
|
|
|
|
loadingFolders: '.x-loading-folders'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
|
this.collection = new UnmappedFolderCollection();
|
|
|
|
@ -19,6 +25,10 @@ define(
|
|
|
|
|
this._showAndSearch(0);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
appendHtml: function(collectionView, itemView, index){
|
|
|
|
|
collectionView.ui.loadingFolders.before(itemView.el);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
_showAndSearch: function (index) {
|
|
|
|
|
var self = this;
|
|
|
|
|
var model = this.collection.at(index);
|
|
|
|
@ -35,6 +45,10 @@ define(
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
this.ui.loadingFolders.hide();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
itemViewOptions: {
|
|
|
|
|