rjs -> webpack

This commit is contained in:
Keivan Beigi
2015-02-02 17:18:45 -08:00
parent 344f3d66ef
commit 428a1439e5
399 changed files with 11591 additions and 16139 deletions

View File

@@ -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);
}
}
});