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

Add link to MICROSCOPY_SAMPLE_TYPE form from MICROSCOPY_EXPERIMENT form, and...

Add link to MICROSCOPY_SAMPLE_TYPE form from MICROSCOPY_EXPERIMENT form, and drop V1 API to build the thumbnail URL.
parent 99547448
No related branches found
No related tags found
No related merge requests found
...@@ -187,11 +187,7 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -187,11 +187,7 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
.css("padding-bottom", "10px") .css("padding-bottom", "10px")
// Link to the dataset (sample) viewer. // Link to the dataset (sample) viewer.
var link = $("<a>").text(displayName).attr("href", "#").attr("title", name).click( var link = FormUtil.getFormLink(displayName, "Sample", sample.permId, null);
function () {
window.top.location.hash = "#" + (new Date().getTime());
return false;
});
// Actual thumbnail. Initially we display a place holder. Later, // Actual thumbnail. Initially we display a place holder. Later,
// we will replace it asynchronously. // we will replace it asynchronously.
...@@ -312,25 +308,15 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -312,25 +308,15 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Find the only fcs file and add its name and URL to the DynaTree // Find the only fcs file and add its name and URL to the DynaTree
datasetFiles.forEach(function (f) { datasetFiles.forEach(function (f) {
// // Build the download URL // Build the download URL
// let url = f.getDataStore().getDownloadUrl() + "/datastore_server/" + var url = f.getDataStore().getDownloadUrl() + "/datastore_server/" +
// f.permId.dataSetId.permId + "/" + f.getPath() + "?sessionID=" + f.permId.dataSetId.permId + "/" + f.getPath() + "?sessionID=" +
// mainController.openbisV3.getWebAppContext().sessionId; mainController.serverFacade.openbisServer.getSession();
if (!f.isDirectory() && f.getPath().toLowerCase() === "thumbnail.png") {
// Still use the V1 API since the sessionId stored in the
// webapp context is null in V3.
mainController.openbisV1.getDownloadUrlForFileForDataSetInSession(
f.getDataSetPermId().permId, f.getPath(), function (url) {
// Replace the image
var eUrl = encodeURI(url);
eUrl = eUrl.replace('+', '%2B');
imD.attr("src", eUrl);
});
}
// Replace the image
var eUrl = encodeURI(url);
eUrl = eUrl.replace('+', '%2B');
imD.attr("src", eUrl);
}); });
}); });
} }
......
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