Radarr/UI/AddSeries/SearchResultCollectionView.js

31 lines
728 B
JavaScript
Raw Normal View History

2013-06-21 01:43:58 +00:00
'use strict';
define(
[
'marionette',
'AddSeries/SearchResultView',
2013-06-30 19:57:26 +00:00
], function (Marionette, SearchResultView) {
2013-06-21 01:43:58 +00:00
return Marionette.CollectionView.extend({
itemView: SearchResultView,
initialize: function (options) {
this.isExisting = options.isExisting;
},
showAll: function () {
this.showingAll = true;
this.render();
},
2013-06-30 19:57:26 +00:00
appendHtml: function (collectionView, itemView, index) {
if (!this.isExisting || this.showingAll || index === 0) {
collectionView.$el.append(itemView.el);
}
2013-06-21 01:43:58 +00:00
}
});
});