set profile name… no tests make me a sad boy, but i must run & will backfill this one tomorrow.

This commit is contained in:
danielgrippi 2012-05-04 22:09:40 -07:00
parent 8111dfba31
commit 456da7844a

View file

@ -37,6 +37,8 @@ app.pages.Profile = app.views.Base.extend({
this.model = new app.models.Profile.findByGuid(options.personId)
this.stream = options && options.stream || new app.models.Stream()
this.model.bind("change", this.setPageTitle, this)
/* binds for getting started pulsation */
this.stream.bind("fetched", this.pulsateNewPostControl, this)
this.stream.items.bind("remove", this.pulsateNewPostControl, this)
@ -57,6 +59,11 @@ app.pages.Profile = app.views.Base.extend({
]("pulse")
},
setPageTitle : function() {
if(this.model.get("name"))
document.title = this.model.get("name")
},
toggleEdit : function(evt) {
if(evt) { evt.preventDefault() }
this.editMode = !this.editMode