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

SSDM-557: Show description if present as explained at SDM-615.

SVN: 32023
parent c1795a55
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,18 @@ function DataSetForm(serverFacade, containerId, profile, sample, mode) { ...@@ -54,8 +54,18 @@ function DataSetForm(serverFacade, containerId, profile, sample, mode) {
$component.attr('required', ''); $component.attr('required', '');
$component.append($("<option>").attr('value', '').attr('selected', '').text('')); $component.append($("<option>").attr('value', '').attr('selected', '').text(''));
for(var i = 0; i < dataSetTypes.length; i++) { for(var i = 0; i < dataSetTypes.length; i++) {
$component.append($("<option>").attr('value',dataSetTypes[i].code).text(dataSetTypes[i].code)); var displayName = dataSetTypes[i].code;
if(dataSetTypes[i].description) {
var length = dataSetTypes[i].description.length > 40;
if(dataSetTypes[i].description.length > 40) {
displayName = dataSetTypes[i].description.substring(1,36) + " ...";
} else {
displayName = dataSetTypes[i].description;
}
}
$component.append($("<option>").attr('value',dataSetTypes[i].code).text(displayName));
} }
return $component; return $component;
......
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