Started possibility to rename column
This commit is contained in:
parent
81bb0ed79e
commit
ed0ea58202
2 changed files with 11 additions and 3 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
|
|
@ -48,8 +48,12 @@
|
|||
<div class="modal-body">
|
||||
<b>Select the data to export:</b>
|
||||
<div class="form-check mt-3">
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Times">
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Times" onclick="display_rename_column(this.checked, 'times-rename-div')">
|
||||
<label class="form-check-label" for="Times">Times of day</label>
|
||||
<div id="times-rename-div" style="display:none">
|
||||
<label class="col-form-label" for="times-rename">Column name:</label>
|
||||
<input type="text" class="form-control form-control-sm col-sm-4" id="times-rename" placeholder="Times" value="Times">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" name="checkedItems" id="Concentrations">
|
||||
|
|
@ -73,7 +77,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" onClick="export_csv();">Export</button>
|
||||
<button type="button" class="btn btn-primary" onclick="export_csv();">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue