aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/routes
diff options
context:
space:
mode:
authorAlexey Kiryushin <alexey.a.kiryushin@gmail.com>2018-11-16 16:19:03 +0300
committerGitHub <noreply@github.com>2018-11-16 16:19:03 +0300
commit866bfff6ff41a2796329c6bb28db688cbfeed2b8 (patch)
tree3da173b79af7727969116df212fba597fbddc3a3 /javascript/app/routes
parentb5a3048a880c8ce1c2bfa795a39576d02f416be2 (diff)
Add cross-package 'find references'
Diffstat (limited to 'javascript/app/routes')
-rw-r--r--javascript/app/routes/package.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/javascript/app/routes/package.js b/javascript/app/routes/package.js
index 9d6772d..1076779 100644
--- a/javascript/app/routes/package.js
+++ b/javascript/app/routes/package.js
@@ -24,10 +24,24 @@ export default Ember.Route.extend({
this.set('controller.currentFile',filePath);
}
},
- updateReferences(packageId,externalId,occName) {
+ updateReferences(packageId,externalId,occName,locationInfo,noScrollIntoView) {
+ this.get('store').loadGlobalReferences(externalId).then((refs) => {
+ Ember.run.next(this,() => {
+ this.set('controller.globalReferences',refs);
+ if(!noScrollIntoView) {
+ Ember.run.schedule('afterRender', () => {
+ const element = document.getElementById('references-package-'+packageId);
+ if(element) {
+ element.scrollIntoView();
+ }
+ });
+ }
+ });
+ });
this.set('controller.packageId',packageId);
this.set('controller.externalId',externalId);
this.set('controller.occName',occName);
+ this.set('controller.locationInfo',locationInfo);
this.set('controller.bottomPanelVisible',true);
this.set('controller.referencesUrl',urls.referencesUrl(packageId,externalId)+"?per_page=50");
},