From 2f19ba18e1009ec59302b5ee8d4f8d06f891e20a Mon Sep 17 00:00:00 2001
From: yvesn <yvesn>
Date: Wed, 31 May 2017 11:04:53 +0000
Subject: [PATCH] SSDM-5083 : ELN - Show print view of object on the storage
 tooltip

SVN: 38239
---
 .../js/views/StorageManager/widgets/GridView.js    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/widgets/GridView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/widgets/GridView.js
index dddff929c06..0bf296131b2 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/widgets/GridView.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/StorageManager/widgets/GridView.js
@@ -126,10 +126,16 @@ function GridView(gridModel) {
 			for(var i = 0; i < labels.length; i++) {
 				if(!usedLabels[labels[i].displayName]) {
 					var labelContainer = $("<div>", { class: "storageBox", id : Util.guid() }).append(labels[i].displayName);
-					if(labels[i].displayName) {
-						//TODO SSDM-5083 - Implementation hints
-						//TODO Check if data is sample and, if then, get the PrintUtil.getTable and put it as tooltip
-						//TODO Check PlateView.js 516
+					if (labels[i].data && labels[i].data["@type"] && labels[i].data["@type"] === "Sample") {
+						var sample = labels[i].data;
+						var tooltip = PrintUtil.getTable(sample, false, null, 'inspectorWhiteFont',
+								'colorEncodedWellAnnotations-holder-' + sample.permId);
+						labelContainer.tooltipster({
+							content: $(tooltip),
+							interactive: true,
+							position : 'right'
+						});
+					} else if(labels[i].displayName) {
 						labelContainer.tooltipster({
 							content: $("<span>").html(labels[i].displayName)
 						});
-- 
GitLab