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

View File

@ -20,3 +20,4 @@
<!--</div>-->
</div>
<div id="add-series-workspace"/>

View File

@ -71,7 +71,6 @@ define(
},
onShow: function () {
this.searchResult.show(this.resultCollectionView);
this.ui.seriesSearch.focus();
},

View File

@ -6,9 +6,15 @@ define(
'AddSeries/Existing/UnmappedFolderCollection'
], function (Marionette, AddSeriesView, UnmappedFolderCollection) {
return Marionette.CollectionView.extend({
return Marionette.CompositeView.extend({
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: {

View File

@ -0,0 +1,5 @@
<div class="x-existing-folders">
<div class="loading-folders x-loading-folders">
Loading search results from trakt for your series, this may take a few minutes.
</div>
</div>

View File

@ -104,6 +104,11 @@
width: 140px;
}
}
.loading-folders {
margin : 30px 0px;
text-align: center;
}
}
li.add-new {