Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data pivot - add columns to the right of the figure #987

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/summary/dataPivot/DPFDescriptionTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ let buildDescriptionTable = function(tab, dp) {
"Header style",
"Text style",
"Maximum width (pixels)",
"To right",
"On-click",
"Ordering",
])
),
colgroup = buildColGroup(["", "", "", "", "120px", "", "120px"]),
colgroup = buildColGroup(["", "", "", "", "", "", "", "120px"]),
tbody = $("<tbody>"),
tbl = $('<table class="table table-sm table-bordered">').html([thead, colgroup, tbody]),
settings = dp.settings.description_settings,
Expand Down
4 changes: 4 additions & 0 deletions frontend/summary/dataPivot/DataPivotUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ class _DataPivot_settings_description {
header_style: this.data_pivot.style_manager.add_select("texts", values.header_style),
text_style: this.data_pivot.style_manager.add_select("texts", values.text_style),
max_width: $('<input class="form-control" type="number">').val(values.max_width),
to_right: $('<input type="checkbox">').prop("checked", values.to_right),
dpe: $('<select class="form-control"></select>')
.html(this.data_pivot.interactivity_options)
.val(values.dpe),
Expand All @@ -312,6 +313,7 @@ class _DataPivot_settings_description {
.append($("<td>").append(this.content.header_style))
.append($("<td>").append(this.content.text_style))
.append($("<td>").append(this.content.max_width))
.append($("<td>").append(this.content.to_right))
.append($("<td>").append(this.content.dpe))
.on("change", "input,select", function() {
self.data_push();
Expand All @@ -336,6 +338,7 @@ class _DataPivot_settings_description {
text_style: "base",
dpe: NULL_CASE,
max_width: undefined,
to_right: false,
};
}

Expand All @@ -346,6 +349,7 @@ class _DataPivot_settings_description {
this.values.text_style = this.content.text_style.find("option:selected").val();
this.values.header_name = this.content.header_name.val();
this.values.max_width = parseFloat(this.content.max_width.val(), 10) || undefined;
this.values.to_right = this.content.to_right.prop("checked");
this.values.dpe = NULL_CASE;
if (this.values.header_name === "") {
this.values.header_name = this.values.field_name;
Expand Down
Loading
Loading