From 866bfff6ff41a2796329c6bb28db688cbfeed2b8 Mon Sep 17 00:00:00 2001 From: Alexey Kiryushin Date: Fri, 16 Nov 2018 16:19:03 +0300 Subject: Add cross-package 'find references' --- javascript/app/routes/package.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'javascript/app/routes') 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"); }, -- cgit v1.2.3