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

SSDM-3480 : show all properties even empty ones.

SVN: 36246
parent c8caafa7
No related branches found
No related tags found
No related merge requests found
var SampleDataGridUtil = new function() { var SampleDataGridUtil = new function() {
this.getSampleDataGrid = function(sampleTypeCode, samples, rowClick, customOperations, customColumns, configPostKey, isOperationsDisabled, isLinksDisabled) { this.getSampleDataGrid = function(mandatoryConfigPostKey, samples, rowClick, customOperations, customColumns, optionalConfigPostKey, isOperationsDisabled, isLinksDisabled) {
var foundPropertyCodes = {}; var foundPropertyCodes = {};
var foundSampleTypes = {};
for(var sIdx = 0; sIdx < samples.length; sIdx++) { for(var sIdx = 0; sIdx < samples.length; sIdx++) {
var sample = samples[sIdx]; var sample = samples[sIdx];
for(var propertyCode in sample.properties) { if(!foundSampleTypes[sample.sampleTypeCode]) {
if(sample.properties[propertyCode]) { foundSampleTypes[sample.sampleTypeCode] = true;
foundPropertyCodes[propertyCode] = true; var propertyCodes = profile.getAllPropertiCodesForTypeCode(sample.sampleTypeCode);
for(var pIdx = 0; pIdx < propertyCodes.length; pIdx++) {
foundPropertyCodes[propertyCodes[pIdx]] = true;
} }
} }
} }
...@@ -197,9 +200,9 @@ var SampleDataGridUtil = new function() { ...@@ -197,9 +200,9 @@ var SampleDataGridUtil = new function() {
var getDataList = SampleDataGridUtil.getDataList(samples); var getDataList = SampleDataGridUtil.getDataList(samples);
//Create and return a data grid controller //Create and return a data grid controller
var configKey = "SAMPLE_TABLE_" + sampleTypeCode; var configKey = "SAMPLE_TABLE_" + mandatoryConfigPostKey;
if(configPostKey) { if(optionalConfigPostKey) {
configKey += "_" + configPostKey; configKey += "_" + optionalConfigPostKey;
} }
var dataGridController = new DataGridController(null, columns, getDataList, rowClick, false, configKey); var dataGridController = new DataGridController(null, columns, getDataList, rowClick, false, configKey);
return dataGridController; return dataGridController;
......
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