diaspora/public/javascripts/app/pages/framer.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

30 lines
633 B
JavaScript

app.pages.Framer = app.views.Base.extend({
templateName : "framer",
id : "post-content",
events : {
"click button.done" : "saveFrame"
},
subviews : {
".post-view" : "postView",
".template-picker" : "templatePicker"
},
initialize : function(){
this.model = app.frame
this.model.authorIsCurrentUser = function(){ return true }
this.model.bind("change", this.render, this)
this.templatePicker = new app.views.TemplatePicker({ model: this.model })
},
postView : function(){
return app.views.Post.showFactory(this.model)
},
saveFrame : function(){
this.model.save()
}
})