Add existing series shows a loading message

Fixed: Message to tell users series are being loaded from trakt
This commit is contained in:
Mark McDowall
2014-02-19 22:02:11 -08:00
parent d703bc8dc5
commit d51517d60c
5 changed files with 27 additions and 3 deletions
@@ -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: {