1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-29 03:15:19 +00:00
Radarr/UI/Series/Details/SeasonMenu/CollectionView.js
2013-08-05 19:01:32 -07:00

31 lines
889 B
JavaScript

'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){
var childrenContainer = $(collectionView.childrenContainer || collectionView.el);
childrenContainer.prepend(itemView.el);
}
});
});