diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-28 19:41:41 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2018-10-28 19:41:41 +0300 |
commit | c622effe8044ae9dbb6508836cf7f879cf824f2f (patch) | |
tree | 02e338aae3c9fe1239544b490faf9bd0f2099468 /javascript/app | |
parent | 8950fffaa93be9ae967b8536e9e177372f87af61 (diff) |
Fix HTML page title
Diffstat (limited to 'javascript/app')
-rw-r--r-- | javascript/app/routes/package.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/javascript/app/routes/package.js b/javascript/app/routes/package.js index 92fea03..9d6772d 100644 --- a/javascript/app/routes/package.js +++ b/javascript/app/routes/package.js @@ -7,9 +7,6 @@ export default Ember.Route.extend({ return this.get('store').loadPackage(params.packageId) .catch((e) => {console.log(e);this.transitionTo("/package-not-found");}); }, - afterModel(model) { - document.title = model.id; - }, setupController(controller, model) { this._super(controller, model); const packageId = this.modelFor('package').id; @@ -17,7 +14,7 @@ export default Ember.Route.extend({ controller.set('createSearchUrlFunction',(query) => { return urls.identifierSearchUrl(packageId,query); }); - }, + }, actions : { openFile (filePath) { this.transitionTo('package.show.file',filePath); @@ -33,6 +30,10 @@ export default Ember.Route.extend({ this.set('controller.occName',occName); this.set('controller.bottomPanelVisible',true); this.set('controller.referencesUrl',urls.referencesUrl(packageId,externalId)+"?per_page=50"); + }, + didTransition() { + document.title = this.currentModel.id; + return true; } } }); |