diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py index b63ea5b092d73373ca156eeb0e9e3241fca7bf6a..bf429e989588e5dcfc7708605cdab7f5519182ef 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/elnTypes.py @@ -875,7 +875,6 @@ EXPERIMENTAL_STEP = [FIRST_TIME_VERSIONED, True, True, "EXPERIMENTAL_STEP", "", [MANDATORY_ITEM_VERSION, "END_DATE", "General", "End date", DataType.TIMESTAMP, None, "Date when the experimental step is completed", None, None], [MANDATORY_ITEM_VERSION, "EXPERIMENTAL_READOUT", "Readout details", "Experimental readout", DataType.CONTROLLEDVOCABULARY, "EXPERIMENTAL_READOUT", "Experimental readout used in the experiment", None, None], [MANDATORY_ITEM_VERSION, "MACHINE", "Readout details", "Machine", DataType.CONTROLLEDVOCABULARY, "MACHINE", "Machine used to perform the experiment", None, None], - [MANDATORY_ITEM_VERSION, "FREEFORM_TABLE_STATE", "Readout details", "Freeform Table State", DataType.MULTILINE_VARCHAR, None, "Table describing how the order of samples measured in the experiments", None, None, None, False], [MANDATORY_ITEM_VERSION, "PUBLICATION", "Comments", "Publication", DataType.MULTILINE_VARCHAR, None, "Publication from where the information was first found OR technical sheet given by the manufacturer", None, None], [MANDATORY_ITEM_VERSION, "NOTES", "Comments", "Notes", DataType.MULTILINE_VARCHAR, None, "Notes", None, None], [MANDATORY_ITEM_VERSION, "XMLCOMMENTS", "Comments", "Comments List", DataType.XML, None, "Several comments can be added by different users", "COMMENTS_SAMPLE", None], diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 3f64bfd2871f0b3fb3175b2bccee4ec7befc49fb..3ebe1065bf27ac6f5c9da2ca7bb29dc71de3aecf 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -556,6 +556,19 @@ $.extend(DefaultProfile.prototype, { return this.allPropertyTypes; } + this.getPropertyTypeFromSampleType = function(sampleType, propertyTypeCode) { + for(var i = 0; i < sampleType.propertyTypeGroups.length; i++) { + var propertyTypeGroup = sampleType.propertyTypeGroups[i]; + for(var j = 0; j < propertyTypeGroup.propertyTypes.length; j++) { + var propertyType = propertyTypeGroup.propertyTypes[j]; + if(propertyType.code === propertyTypeCode) { + return propertyType; + } + } + } + return null; + } + this.getPropertyType = function(propertyTypeCode) { for (var i = 0; i < this.allPropertyTypes.length; i++) { if(this.allPropertyTypes[i].code === propertyTypeCode) { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js index 53f1b800add8020e1742e7805582e5d99ccfe337..dfa64e61e3638e52675159d789e9903f2d0aff88 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/StandardProfile.js @@ -433,7 +433,8 @@ $.extend(StandardProfile.prototype, DefaultProfile.prototype, { } this.sampleFormContentExtra = function(sampleTypeCode, sample, containerId) { - if(sampleTypeCode === "EXPERIMENTAL_STEP") { + var sampleType = this.getSampleTypeForSampleTypeCode(sampleTypeCode); + if(this.getPropertyTypeFromSampleType(sampleType, "FREEFORM_TABLE_STATE")) { var isEnabled = mainController.currentView._sampleFormModel.mode !== FormMode.VIEW; var freeFormTableController = new FreeFormTableController(sample, isEnabled); freeFormTableController.init($("#" + containerId));