From dc4dc9e770fa95bf40c229d6a6d7e8f205909625 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Thu, 25 Feb 2016 13:28:12 +0000 Subject: [PATCH] SSDM-3212 : Barcodes as names on form and hierarchy view SVN: 35736 --- .../eln-lims/html/js/config/installations/NexusProfile.js | 1 + .../eln-lims/html/js/views/legacy/SampleHierarchy.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/installations/NexusProfile.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/installations/NexusProfile.js index 21c2679f25d..0a2dd1f1e67 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/installations/NexusProfile.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/installations/NexusProfile.js @@ -7,6 +7,7 @@ $.extend(NexusProfile.prototype, StandardProfile.prototype, { init: function(serverFacade){ DefaultProfile.prototype.init.call(this, serverFacade); + this.propertyReplacingCode = "CELLARIO_BC"; this.inventorySpaces = ["LIBRARIES"]; this.searchSamplesUsingV3OnDropbox = true; this.searchSamplesUsingV3OnDropboxRunCustom = true; diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js index 98d6844208e..586dd340f71 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js @@ -307,7 +307,12 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { 'style' : 'cursor:pointer; width:13px; height:18px;', })); - var $sampleLink = $('<a>', { 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).html(sample.code); + var nameLabel = sample.properties[profile.propertyReplacingCode]; + if(!nameLabel) { + nameLabel = sample.code; + } + + var $sampleLink = $('<a>', { 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).text(nameLabel); -- GitLab