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
30 lines
633 B
JavaScript
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()
|
|
}
|
|
})
|