Skip to content

Commit

Permalink
Merge pull request #1881 from ebroda/fix-js-use-bootstrap-functions
Browse files Browse the repository at this point in the history
Call bootstrap functions for accordion hide/show
  • Loading branch information
jh-RLI authored Oct 10, 2024
2 parents b9e9df1 + 33a04a0 commit 30165ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dataedit/static/wizard/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,19 +715,20 @@ 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);
}


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) {
Expand Down Expand Up @@ -831,7 +832,6 @@ function calculateEmbargoPeriod(embargoValue) {
});
$("#wizard-confirm-delete-delete").bind("click", deleteTable);


showUpload();
} else {
showCreate();
Expand Down
2 changes: 2 additions & 0 deletions versions/changelogs/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 30165ba

Please sign in to comment.