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

A few more layout tweaks.

parent fcd91eb1
No related branches found
No related tags found
No related merge requests found
...@@ -139,7 +139,7 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -139,7 +139,7 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
numSample++; numSample++;
// Add a new row for the next three thumbnails // Add a new row for the next three thumbnails
if (numSample % 3 === 1) { if (numSample % 4 === 1) {
newThumbRow = $("<div />", { class: "row" }); newThumbRow = $("<div />", { class: "row" });
sampleView_div.append(newThumbRow); sampleView_div.append(newThumbRow);
} }
...@@ -173,7 +173,8 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -173,7 +173,8 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// elements related to current sample // elements related to current sample
var newThumbCol = $("<div />", var newThumbCol = $("<div />",
{ {
class: "col-md-4", class: "col-md-3",
display: "inline",
"text-align": "center", "text-align": "center",
id: sample.code id: sample.code
}); });
...@@ -275,6 +276,9 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -275,6 +276,9 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Find the thumbnail.png file // Find the thumbnail.png file
response.result.forEach(function (f) { response.result.forEach(function (f) {
// Thumbnail
var imD = $("#" + img_id);
if (!f.isDirectory && f.pathInDataSet.toLowerCase() === "thumbnail.png") { if (!f.isDirectory && f.pathInDataSet.toLowerCase() === "thumbnail.png") {
// Retrieve the file URL // Retrieve the file URL
...@@ -284,17 +288,19 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, { ...@@ -284,17 +288,19 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Replace the image // Replace the image
var eUrl = encodeURI(url); var eUrl = encodeURI(url);
eUrl = eUrl.replace('+', '%2B'); eUrl = eUrl.replace('+', '%2B');
$("#" + img_id).attr("src", eUrl); imD.attr("src", eUrl);
}); });
} else { } else {
// Thumbnail not found! // Thumbnail not found!
var imD = $("#" + img_id);
imD.attr("src", "./img/error.png"); imD.attr("src", "./img/error.png");
imD.attr("title", "Could not find a thumbnail for this dataset!"); imD.attr("title", "Could not find a thumbnail for this dataset!");
} }
// Make sure to reset the display attribute
imD.css("display", "inline");
}); });
}); });
......
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