mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-31 21:14:01 +00:00
rjs -> webpack
This commit is contained in:
@@ -1,35 +1,24 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'AddSeries/SearchResultView'
|
||||
], function (Marionette, SearchResultView) {
|
||||
var Marionette = require('marionette');
|
||||
var SearchResultView = require('./SearchResultView');
|
||||
|
||||
return Marionette.CollectionView.extend({
|
||||
|
||||
itemView: SearchResultView,
|
||||
|
||||
initialize: function (options) {
|
||||
this.isExisting = options.isExisting;
|
||||
this.showing = 1;
|
||||
},
|
||||
|
||||
showAll: function () {
|
||||
this.showingAll = true;
|
||||
this.render();
|
||||
},
|
||||
|
||||
showMore: function () {
|
||||
this.showing += 5;
|
||||
this.render();
|
||||
|
||||
return this.showing >= this.collection.length;
|
||||
},
|
||||
|
||||
appendHtml: function (collectionView, itemView, index) {
|
||||
if (!this.isExisting || index < this.showing || index === 0) {
|
||||
collectionView.$el.append(itemView.el);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
module.exports = Marionette.CollectionView.extend({
|
||||
itemView : SearchResultView,
|
||||
initialize : function(options){
|
||||
this.isExisting = options.isExisting;
|
||||
this.showing = 1;
|
||||
},
|
||||
showAll : function(){
|
||||
this.showingAll = true;
|
||||
this.render();
|
||||
},
|
||||
showMore : function(){
|
||||
this.showing += 5;
|
||||
this.render();
|
||||
return this.showing >= this.collection.length;
|
||||
},
|
||||
appendHtml : function(collectionView, itemView, index){
|
||||
if(!this.isExisting || index < this.showing || index === 0) {
|
||||
collectionView.$el.append(itemView.el);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user