Closed vedina closed 9 years ago
implemented in ambit SVN r6653
note the new API option /substance?type=related&compound_udi=..&addDummySubstance=true http://ideaconsult.github.io/examples-ambit/apidocs/#!/substance_1
and in u-matrix.js
function onDetailedRow(row, data, event) {
var el = $('.jtox-details-composition', row)[0];
if (!el)
return;
var uri = this.settings.baseUrl + '/substance?type=related&addDummySubstance=true&compound_uri=' + encodeURIComponent(data.compound.URI);
el = $(el).parents('table')[0];
el = el.parentNode;
$(el).empty();
$(el).addClass('paddingless');
var div = document.createElement('div');
el.appendChild(div);
new jToxSubstance(div, $.extend(true, {}, this.settings, {crossDomain: true, selectionHandler: null, substanceUri: uri, showControls: false, onLoaded: null, onDetails: function (root, data, element) {
new jToxStudy(root, $.extend({}, this.settings, {substanceUri: data.URI}));
} } ) );
}
function preDetailedRow(index, cell) {
var self = this;
var data = this.dataset.dataEntry[index];
var uri = this.settings.baseUrl + '/substance?type=related&addDummySubstance=true&compound_uri=' + encodeURIComponent(data.compound.URI) + '&filterbybundle=' + encodeURIComponent(this.settings.bUri) + '&bundle_uri=' + encodeURIComponent(this.settings.bUri);
Please add &addDummySubstance=true
for the query retrieving substances per compound
/substance?type=related&compound_uri='
Ideally, in the Endpoint data used
/ Search substance
tab only
The query param is added to the query and also small tweak to show empty reference substance UUID instead of null.
Please also fix the display in case Substance UUID
is null
Show data from the dataset storage (e.g. 'no substance data') in the matrix