diff --git a/dataedit/static/wizard/wizard.js b/dataedit/static/wizard/wizard.js index 5c391a59e..19d68be33 100644 --- a/dataedit/static/wizard/wizard.js +++ b/dataedit/static/wizard/wizard.js @@ -715,8 +715,8 @@ function calculateEmbargoPeriod(embargoValue) { function showCreate() { // create default id column addColumn({"name": "id", "data_type": "bigint", "is_nullable": false, "is_pk": true}); - $("#wizard-container-upload").collapse("hide"); - $("#wizard-container-create").collapse("show"); + new bootstrap.Collapse('#wizard-container-create', {'toggle': false}).show(); + new bootstrap.Collapse('#wizard-container-upload', {'toggle': false}).hide(); $("#wizard-table-delete").hide(); $("#wizard-container-upload").find(".btn").hide(); $("#wizard-container-upload").find("input").prop("readonly", true); @@ -724,10 +724,11 @@ function calculateEmbargoPeriod(embargoValue) { function showUpload() { - $("#wizard-container-create").collapse("hide"); - $("#wizard-container-upload").collapse("show"); - $("#wizard-container-create").find(".btn").hide(); + new bootstrap.Collapse('#wizard-container-create', {'toggle': false}).hide(); + new bootstrap.Collapse('#wizard-container-upload', {'toggle': false}).show(); $("#wizard-table-delete").show(); + + $("#wizard-container-create").find(".btn").hide(); $("#wizard-container-create").find("input").prop("readonly", true); $("#wizard-container-create").find("input,select,.combobox-container").not("[type=text]").prop("disabled", true); if (!state.canAdd) { @@ -831,7 +832,6 @@ function calculateEmbargoPeriod(embargoValue) { }); $("#wizard-confirm-delete-delete").bind("click", deleteTable); - showUpload(); } else { showCreate(); diff --git a/versions/changelogs/current.md b/versions/changelogs/current.md index 0617dabb2..2e7d2d004 100644 --- a/versions/changelogs/current.md +++ b/versions/changelogs/current.md @@ -11,4 +11,6 @@ ## Bugs +- Fixed wrong calls in dataedit wizard to open collapsed items [(#1881)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1881) + ## Documentation updates