diff --git a/webapp/Connector/src/app/store/StudyOverview.js b/webapp/Connector/src/app/store/StudyOverview.js index 003f26fc4..1887cd814 100644 --- a/webapp/Connector/src/app/store/StudyOverview.js +++ b/webapp/Connector/src/app/store/StudyOverview.js @@ -42,9 +42,6 @@ Ext.define('Connector.app.store.StudyOverview', { LABKEY.Query.selectRows({ schemaName: 'cds.metadata', queryName: 'study', - filterArray: [ - LABKEY.Filter.create('study_name', id, LABKEY.Filter.Types.EQUALS) - ], success: this.onLoadStudies, scope: this }); @@ -406,6 +403,9 @@ Ext.define('Connector.app.store.StudyOverview', { return Connector.model.Filter.sorters.natural(relA.rel_prot, relB.rel_prot); }); + var external_links = this.external_links.filter(function(link) { + return link.protocol_id === study.study_name; + }); var mabs = this.mabMixData.filter(function(mab) { return mab.prot === study.study_name; @@ -564,7 +564,7 @@ Ext.define('Connector.app.store.StudyOverview', { study.data_available = (study.assays_added_count > 0 || study.ni_assays_added_count > 0 || study.pub_available_data_count > 0) ? 'Data added' : 'Data not added'; // additional data repositories - study.external_links = this.external_links; + study.external_links = external_links; studies.push(study); }, this); diff --git a/webapp/Connector/src/view/Learn.js b/webapp/Connector/src/view/Learn.js index 747ab212b..a045fdaa5 100644 --- a/webapp/Connector/src/view/Learn.js +++ b/webapp/Connector/src/view/Learn.js @@ -514,6 +514,9 @@ Ext.define('Connector.view.Learn', { } if (id || !this.dimensionDataLoaded[dimensionName]) { + if (this.isQueryParamId(id)) + id = undefined; + store.on('load', function() { this.dimensionDataLoaded[dimensionName] = true; this.sortAndFilterStoreDelayed(store); @@ -661,9 +664,15 @@ Ext.define('Connector.view.Learn', { } }, + // returns if the id is a query parameter + isQueryParamId : function(id) { + let delimiter = Connector.getService('Learn').URL_DELIMITER; + return (Ext.isString(id) && id.indexOf(delimiter) !== -1); + }, + resolveModel : function(store, id) { - var delimiter = Connector.getService('Learn').URL_DELIMITER; - if (Ext.isString(id) && id.indexOf(delimiter) !== -1) { + if (this.isQueryParamId(id)) { + let delimiter = Connector.getService('Learn').URL_DELIMITER; var _id = id.split(delimiter), prop = _id[0], val = Ext.isNumber(parseInt(_id[1])) ? parseInt(_id[1]) : _id[1],