From 456da7844a6fd9aaad5134ea020e48a082e116b1 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Fri, 4 May 2012 22:09:40 -0700 Subject: [PATCH] =?UTF-8?q?set=20profile=20name=E2=80=A6=20no=20tests=20ma?= =?UTF-8?q?ke=20me=20a=20sad=20boy,=20but=20i=20must=20run=20&=20will=20ba?= =?UTF-8?q?ckfill=20this=20one=20tomorrow.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/app/pages/profile.js | 7 +++++++ 1 file changed, 7 insertions(+) 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