diaspora/public/javascripts/app/views/post/day_view.js
Dennis Collinson 6288eff599 day mood for a post responds to content
extract creating a post with templates to a static post view method.

Legacy templates extracted, day view

day mood shows photos and has variable text size
2012-03-27 14:54:27 -07:00

16 lines
No EOL
400 B
JavaScript

app.views.Post.Day = app.views.Post.extend({
templateName : "day",
className : "day post loaded",
subviews : { "section.photo_viewer" : "photoViewer" },
photoViewer : function(){
return new app.views.PhotoViewer({ model : this.model })
},
postRenderTemplate : function(){
if(this.model.get("text").length < 140){
this.$('section.text').addClass('headline');
}
}
});