From 0d8a86414219fc4184bda929f638ae4f89a56f81 Mon Sep 17 00:00:00 2001 From: felmer <franz-josef.elmer@id.ethz.ch> Date: Wed, 12 Feb 2020 08:03:36 +0100 Subject: [PATCH] SSDM-9205: Show children/parent section by default --- .../eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js | 2 ++ .../eln-lims/html/js/views/SampleForm/SampleFormView.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index 93a249d74d6..da14841aa4e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -1041,6 +1041,8 @@ var FormUtil = new function() { var sectionSetting = sectionsSettings[option.label]; if (sectionSetting !== undefined) { shown = sectionSetting === 'shown'; + } else if (option.showByDefault) { + shown = true; } else { shown = ! profile.hideSectionsByDefault; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 6971e177f35..8dc28bc0936 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -905,7 +905,8 @@ function SampleFormView(sampleFormController, sampleFormModel) { hideShowOptionsModel.push({ forceToShow : this._sampleFormModel.mode === FormMode.CREATE && (sampleTypeDefinitionsExtension && sampleTypeDefinitionsExtension["FORCE_TO_SHOW_PARENTS_SECTION"]), label : "Parents", - section : "#sample-parents" + section : "#sample-parents", + showByDefault : true }); var requiredParents = []; @@ -941,7 +942,8 @@ function SampleFormView(sampleFormController, sampleFormModel) { this._createChildrenSection = function(hideShowOptionsModel, sampleTypeDefinitionsExtension, sampleTypeCode) { hideShowOptionsModel.push({ label : "Children", - section : "#sample-children" + section : "#sample-children", + showByDefault : true }); var _this = this; -- GitLab