From 80fe767cdeb3b23caf37f8c2b2b20bd16c70bfa3 Mon Sep 17 00:00:00 2001 From: "Fuentes Serna Juan Mariano (ID SIS)" <juanf@bs-mbpr28.d.ethz.ch> Date: Thu, 8 Feb 2018 15:31:32 +0100 Subject: [PATCH] SSDM-6014 --- .../views/StorageManager/widgets/GridView.js | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 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 5bb875a455f..3e8bc52f72c 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 @@ -131,26 +131,22 @@ function GridView(gridModel) { sample = jQuery.extend(true, {}, labels[i].data); } - if(sample && sample.sampleTypeCode === "STORAGE_POSITION") { - if(sample.parents && sample.parents[0]) { - if(profile.propertyReplacingCode && sample.parents[0].properties && sample.parents[0].properties[profile.propertyReplacingCode]) { - // Label - labels[i].displayName = sample.parents[0].properties[profile.propertyReplacingCode]; - // Tooltip, show also information from the parent - sample.properties[profile.propertyReplacingCode] = sample.parents[0].properties[profile.propertyReplacingCode]; - } else { - //Label - labels[i].displayName = sample.parents[0].code; - //Tooltip, show also information from the parent - sample.code = sample.parents[0].code; - } - - var href = Util.getURLFor(null, "showViewSamplePageFromPermId", sample.parents[0].permId); - optSampleTitle = $("<a>", { "href" : href, "class" : "browser-compatible-javascript-link" }).append(labels[i].displayName); - optSampleTitle.click(function() { - mainController.changeView("showViewSamplePageFromPermId", sample.parents[0].permId); - }); + if(sample && sample.sampleTypeCode === "STORAGE_POSITION" && sample.parents && sample.parents[0]) { + if(profile.propertyReplacingCode && sample.parents[0].properties && sample.parents[0].properties[profile.propertyReplacingCode]) { + // Label + labels[i].displayName = sample.parents[0].properties[profile.propertyReplacingCode]; + } else { + //Label + labels[i].displayName = sample.parents[0].code; } + + sample = sample.parents[0]; + + var href = Util.getURLFor(null, "showViewSamplePageFromPermId", sample.permId); + optSampleTitle = $("<a>", { "href" : href, "class" : "browser-compatible-javascript-link" }).append(labels[i].displayName); + optSampleTitle.click(function() { + mainController.changeView("showViewSamplePageFromPermId", sample.permId); + }); } var labelContainer = $("<div>", { class: "storageBox", id : Util.guid() }).append(labels[i].displayName); -- GitLab