mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Added seasons to top of series details (toggling and jump to)
This commit is contained in:
31
UI/Series/Details/SeasonMenu/CollectionView.js
Normal file
31
UI/Series/Details/SeasonMenu/CollectionView.js
Normal 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);
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user