From ed0ea5820248780108d4da80e7662e32ef0be5de Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Fri, 5 Aug 2022 17:21:29 +0200 Subject: [PATCH] Started possibility to rename column --- cara/apps/calculator/static/js/report.js | 6 +++++- cara/apps/templates/base/calculator.report.html.j2 | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cara/apps/calculator/static/js/report.js b/cara/apps/calculator/static/js/report.js index 23e9b1aa..eb9e88ee 100644 --- a/cara/apps/calculator/static/js/report.js +++ b/cara/apps/calculator/static/js/report.js @@ -862,6 +862,11 @@ function copy_clipboard(shareable_link) { navigator.clipboard.writeText(shareable_link); } +function display_rename_column(bool, id) { + if (bool) document.getElementById(id).style.display = 'block'; + else document.getElementById(id).style.display = 'none'; +} + function export_csv() { // This function generates a CSV file according to the user's input. // It is composed of a list of lists. @@ -870,7 +875,6 @@ function export_csv() { // respective data from the selected inputs. let final_export = []; - // Verify which items are checked let export_lists = document.getElementsByName('checkedItems'); let checked_items = []; diff --git a/cara/apps/templates/base/calculator.report.html.j2 b/cara/apps/templates/base/calculator.report.html.j2 index 06069c67..37c6f3e5 100644 --- a/cara/apps/templates/base/calculator.report.html.j2 +++ b/cara/apps/templates/base/calculator.report.html.j2 @@ -48,8 +48,12 @@