diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index b73bcdf2c..1915d7dc2 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -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