MS DC You can has choose a template

This commit is contained in:
Dennis Collinson
2012-03-22 16:58:07 -07:00
parent 11eb1eb7d8
commit 775eca0026
9 changed files with 25 additions and 17 deletions

View File

@@ -22,7 +22,7 @@ app.pages.Framer = app.views.Base.extend({
postView : function(){
//we might be leaky like cray cray with this
var templateType = this.model.get("templateName")
var templateType = this.model.get("frame_name")
this._postView = new app.views.Post({
model : this.model,

View File

@@ -25,11 +25,13 @@ app.pages.PostViewer = app.views.Base.extend({
this.authorView = new app.views.PostViewerAuthor({ model : this.model });
this.interactionsView = new app.views.PostViewerInteractions({ model : this.model });
this.navView = new app.views.PostViewerNav({ model : this.model });
var frameName = this.model.get("frame_name")
this.postView = new app.views.Post({
model : this.model,
className : this.model.get("templateName") + " post loaded",
templateName : "post-viewer/content/" + this.model.get("templateName"),
attributes : {"data-template" : this.model.get("templateName")}
className : frameName + " post loaded",
templateName : "post-viewer/content/" + frameName,
attributes : {"data-template" : frameName}
});
this.render();

View File

@@ -2,7 +2,7 @@ app.views.TemplatePicker = app.views.Base.extend({
templateName : "template-picker",
initialize : function(){
this.model.set({templateName : 'status'})
this.model.set({frame_name : 'status'})
},
events : {
@@ -10,11 +10,11 @@ app.views.TemplatePicker = app.views.Base.extend({
},
postRenderTemplate : function(){
this.$("select[name=template]").val(this.model.get("templateName"))
this.$("select[name=template]").val(this.model.get("frame_name"))
},
setModelTemplate : function(evt){
this.model.set({"templateName": this.$("select[name=template]").val()})
this.model.set({"frame_name": this.$("select[name=template]").val()})
},
presenter : function() {