Skip to content
Snippets Groups Projects
Commit 2c3a7fba authored by juanf's avatar juanf
Browse files

SSDM-1959 : Show gene name instead of gene number in ELN plate hierarchy view

SVN: 34252
parent 61f102d4
No related branches found
No related tags found
No related merge requests found
...@@ -235,10 +235,6 @@ $.extend(DefaultProfile.prototype, { ...@@ -235,10 +235,6 @@ $.extend(DefaultProfile.prototype, {
}; };
} }
} }
this.inspectorContentExtra = function(sample, propertyContent) {
return "";
}
this.getHTMLTableFromManagePropertyXML = function(xmlDocument) { this.getHTMLTableFromManagePropertyXML = function(xmlDocument) {
var table_head = null; var table_head = null;
......
...@@ -25,39 +25,35 @@ var PrintUtil = new function() { ...@@ -25,39 +25,35 @@ var PrintUtil = new function() {
$(newWindow.document.body).html(pageToPrint); $(newWindow.document.body).html(pageToPrint);
} }
this.getParentsChildrenText = function(parentsChildrenList) { this.getParentsChildrenText = function(samplesList) {
var allParentCodesByType = {}; var allSamplesByType = {};
if(parentsChildrenList) { if(samplesList) {
for(var i = 0; i < parentsChildrenList.length; i++) { for(var i = 0; i < samplesList.length; i++) {
var parent = parentsChildrenList[i]; var sample = samplesList[i];
var parentsWithType = allParentCodesByType[parent.sampleTypeCode]; var samplesByType = allSamplesByType[sample.sampleTypeCode];
if(parentsWithType === null || parentsWithType === undefined) { if(samplesByType === null || samplesByType === undefined) {
parentsWithType = new Array(); samplesByType = new Array();
} }
parentsWithType.push(parent); samplesByType.push(sample);
allParentCodesByType[parent.sampleTypeCode] = parentsWithType; allSamplesByType[sample.sampleTypeCode] = samplesByType;
} }
} }
var allParentCodesAsText = ""; var samplesListOfCodes = "";
for(var sampleType in allParentCodesByType) { for(var sampleTypeCode in allSamplesByType) {
var displayName = profile.getSampleTypeForSampleTypeCode(sampleType).description; samplesListOfCodes += sampleTypeCode + ": ";
if(displayName === null) { var samples = allSamplesByType[sampleTypeCode];
displayName = sampleType; for(var i = 0; i < samples.length; i++) {
var sample = samples[i];
samplesListOfCodes += sample.code + " ";
} }
allParentCodesAsText += displayName + ": "; samplesListOfCodes += "</br>";
var parents = allParentCodesByType[sampleType];
for(var i = 0; i < parents.length; i++) {
var parent = parents[i];
allParentCodesAsText += parent.code + " ";
}
allParentCodesAsText += "</br>";
} }
return allParentCodesAsText; return samplesListOfCodes;
} }
this.getTable = function(entity, isNotTransparent, optionalTitle, customClass, extraCustomId, extraContent) { this.getTable = function(entity, isNotTransparent, optionalTitle, customClass, extraCustomId, extraContent) {
...@@ -158,24 +154,12 @@ var PrintUtil = new function() { ...@@ -158,24 +154,12 @@ var PrintUtil = new function() {
inspector += "</table>" inspector += "</table>"
var extraContainerId = null; if(extraCustomId && extraContent) {
var extraHTML = null; inspector += "<div class='inspectorExtra' id='"+ extraCustomId + "'>" + extraContent + "</div>";
if(extraContent && extraCustomId) {
extraContainerId = extraCustomId;
extraHTML = extraContent;
} else {
extraContainerId = this.getExtraContainerId(entity);
extraHTML = "";
} }
inspector += "<div class='inspectorExtra' id='"+ extraContainerId + "'>" + extraHTML + "</div>";
profile.inspectorContentExtra(extraContainerId, entity);
inspector += "</div>" inspector += "</div>"
return inspector; return inspector;
} }
this.getExtraContainerId = function(entity) {
return "INSPECTOR_EXTRA_" + entity.permId;
}
} }
\ No newline at end of file
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