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

SSDM-1614 : YEASTLAB - ELN UI - Show Names

SVN: 33680
parent f7c88a8e
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,11 @@
* General Overrides
*/
a:hover {
text-decoration: none;
cursor: pointer;
}
#mainContainer.col-md-12 {
padding-top: 30px;
}
......
......@@ -544,7 +544,7 @@ function SampleLinksWidget(containerId, profile, serverFacade, title, sampleType
var propertiesToShowDisplayNames = this.profile.getPropertiesDisplayNamesForTypeCode(sampleToAdd.sampleTypeCode, propertiesToShow);
var meaningfulInfo = "<b>Code: </b>" + sampleToAdd.code + " ";
var name = sampleToAdd.properties["NAME"];
if(!name) {
name = sampleToAdd.properties["PLASMID_NAME"];
......@@ -552,27 +552,33 @@ function SampleLinksWidget(containerId, profile, serverFacade, title, sampleType
if(!name) {
name = sampleToAdd.properties["YEAST_STRAIN_NAME"];
}
var info = $("<span>");
var codeLink = $("<a>").append(sampleToAdd.code);
codeLink.click(function() {
mainController.changeView("showViewSamplePageFromPermId",sampleToAdd.permId);
});
var infoCode = $("<span>")
.append($("<b>").append("Code: "))
.append(codeLink);
info.append(infoCode);
if(name) {
meaningfulInfo += " <b>Name: </b>" + name + " ";
var infoName = $("<span>")
.append($("<b>").append("&nbsp;Name: "))
.append(name);
info.append(infoName);
}
for(var j = 0; j < propertiesToShow.length; j++) {
var propertyToShow = sampleToAdd.properties[propertiesToShow[j]];
if(!propertyToShow && propertiesToShow[j].charAt(0) === '$') {
propertyToShow = sampleToAdd.properties[propertiesToShow[j].substr(1)];
}
var propertyToShowDisplayName = propertiesToShowDisplayNames[j];
meaningfulInfo += "<b>" + propertyToShowDisplayName + ": </b>" + Util.getEmptyIfNull(propertyToShow) + " ";
}
var $input = $("#" +freePredefinedSampleId);
if(meaningfulInfo.length > 200) {
meaningfulInfo = meaningfulInfo.substring(0, 200) + "...";
}
$input.empty();
$input.append(meaningfulInfo);
$input.append(info);
if(this.isDisabled) {
$input.after(meaningfulInfo);
$input.after(info);
$input.hide();
}
//Update annotations when adding an existing sample for updates
......
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