Skip to content
Snippets Groups Projects
Commit 87b46091 authored by Aaron Ponti's avatar Aaron Ponti
Browse files

Bug fix: use the correct dataset code to retrieve the thumbnail URL.

parent 111a3280
No related branches found
No related tags found
No related merge requests found
...@@ -262,9 +262,6 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -262,9 +262,6 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
DataSetFileFetchOptions) { DataSetFileFetchOptions) {
// First retrieve the sample again but with the associated datasets // First retrieve the sample again but with the associated datasets
console.log("Processing microscopy sample " + sample.code);
// Search for the sample of type and given perm id
var criteria = new SampleSearchCriteria(); var criteria = new SampleSearchCriteria();
criteria.withType().withCode().thatEquals(sample.sampleTypeCode); criteria.withType().withCode().thatEquals(sample.sampleTypeCode);
criteria.withPermId().thatEquals(sample.permId); criteria.withPermId().thatEquals(sample.permId);
...@@ -325,15 +322,12 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -325,15 +322,12 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Still use the V1 API since the sessionId stored in the // Still use the V1 API since the sessionId stored in the
// webapp context is null in V3. // webapp context is null in V3.
mainController.openbisV1.getDownloadUrlForFileForDataSetInSession( mainController.openbisV1.getDownloadUrlForFileForDataSetInSession(
dataSet.code, f.getPath(), function (url) { f.getDataSetPermId().permId, f.getPath(), function (url) {
// Replace the image // Replace the image
var eUrl = encodeURI(url); var eUrl = encodeURI(url);
eUrl = eUrl.replace('+', '%2B'); eUrl = eUrl.replace('+', '%2B');
imD.attr("src", eUrl); imD.attr("src", eUrl);
console.log("Adding thumbnail " + eUrl + " to " + img_id);
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment