aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/routes
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/app/routes')
-rw-r--r--javascript/app/routes/package.js9
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;
}
}
});