Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions webapp/Connector/src/app/store/StudyOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
13 changes: 11 additions & 2 deletions webapp/Connector/src/view/Learn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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],
Expand Down