page title update fix
This commit is contained in:
@@ -74,6 +74,8 @@ define('views/detail', 'views/main', function (Dep) {
|
||||
this.setupHeader();
|
||||
this.setupRecord();
|
||||
|
||||
this.setupPageTitle();
|
||||
|
||||
if (this.getMetadata().get('scopes.' + this.scope + '.stream')) {
|
||||
if (this.model.has('isFollowed')) {
|
||||
this.handleFollowButton();
|
||||
@@ -85,6 +87,17 @@ define('views/detail', 'views/main', function (Dep) {
|
||||
}
|
||||
},
|
||||
|
||||
setupPageTitle: function () {
|
||||
this.listenTo(this.model, 'after:save', function () {
|
||||
this.updatePageTitle();
|
||||
}, this);
|
||||
this.listenTo(this.model, 'sync', function (model) {
|
||||
if (model && model.hasChanged('name')) {
|
||||
this.updatePageTitle();
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
|
||||
setupHeader: function () {
|
||||
this.createView('header', this.headerView, {
|
||||
model: this.model,
|
||||
@@ -98,7 +111,6 @@ define('views/detail', 'views/main', function (Dep) {
|
||||
if (this.getView('header')) {
|
||||
this.getView('header').reRender();
|
||||
}
|
||||
this.updatePageTitle();
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user