mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
25 lines
No EOL
722 B
JavaScript
25 lines
No EOL
722 B
JavaScript
NEWSBLUR.Views.Folder = Backbone.View.extend({
|
|
|
|
className: 'NB-folder',
|
|
|
|
initialize: function(models) {
|
|
this.models = models;
|
|
},
|
|
|
|
render: function() {
|
|
console.log(["render models", this.models]);
|
|
var $feeds = _.map(this.models, function(model) {
|
|
var $model;
|
|
console.log(["model", model]);
|
|
if (_.isNumber(model)) {
|
|
var model = NEWSBLUR.assets.feeds.get(model);
|
|
return new NEWSBLUR.Views.Feed({model: model}).render().el;
|
|
} else {
|
|
return new NEWSBLUR.Views.Folder(model).render().el;
|
|
}
|
|
});
|
|
$(this.el).append($feeds);
|
|
return this;
|
|
}
|
|
|
|
}); |