diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/DataGridController.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/DataGridController.js index 1f18e84a0b732230ac3475528e591a8db8796638..1c55b8ea995bc54f1fb18c71f5da26e4885cf131 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/DataGridController.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/DataGridController.js @@ -149,34 +149,14 @@ function DataGridController( var value = null if (column.render) { -// if(Array.isArray(params.value)) { -// var values = params.value.sort(); -// value = []; -// for (var x of values) { -// if(value.length > 0) { -// value.push(', '); -// } -// value.push(column.render(params.row, { -// lastReceivedData: _this.lastReceivedData, -// lastUsedOptions: _this.lastUsedOptions, -// container: params.container, -// value: x -// })); -// } -// } else { - value = column.render(params.row, { - lastReceivedData: _this.lastReceivedData, - lastUsedOptions: _this.lastUsedOptions, - container: params.container, - value: params.value - }); -// } + value = column.render(params.row, { + lastReceivedData: _this.lastReceivedData, + lastUsedOptions: _this.lastUsedOptions, + container: params.container, + value: params.value + }); } else { -// if(Array.isArray(params.value)) { -// value = params.value.sort().join(', '); -// } else { - value = params.value; -// } + value = params.value; } if (value === null || value === undefined || value === "") { diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js index 5d0b89e4be4d7833341e02629eaffdf69ea562fb..b25f551b62a9a57df4055bbaf95e2ca29cbdffe9 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataGrid/SampleDataGridUtil.js @@ -963,7 +963,18 @@ var SampleDataGridUtil = new function() { } else if(propertyType.dataType === "SAMPLE") { renderValue = (function(propertyType){ return function(row, params){ - return FormUtil.getFormLink(params.value, "Sample", params.value) + if(Array.isArray(params.value)) { + var result = []; + for (var singleValue of params.value) { + if(result.length > 0) { + result.push(', ') + } + result.push(FormUtil.getFormLink(singleValue, "Sample", singleValue)); + } + return result; + } else { + return FormUtil.getFormLink(params.value, "Sample", params.value); +} } })(propertyType) }