Added seasons to top of series details (toggling and jump to)

This commit is contained in:
Mark McDowall 2013-07-31 23:32:36 -07:00
parent 49c5762c6d
commit 125deb3931
9 changed files with 176 additions and 5 deletions

View file

@ -0,0 +1,31 @@
'use strict';
define(
[
'marionette',
'Series/Details/SeasonMenu/ItemView'
], function (Marionette, ItemView) {
return Marionette.CollectionView.extend({
itemView: ItemView,
initialize: function (options) {
if (!options.episodeCollection) {
throw 'episodeCollection is needed';
}
this.episodeCollection = options.episodeCollection;
},
itemViewOptions: function () {
return {
episodeCollection: this.episodeCollection,
};
},
appendHtml: function(collectionView, itemView, index){
var childrenContainer = $(collectionView.childrenContainer || collectionView.el);
childrenContainer.prepend(itemView.el);
}
});
});