rough implementation of empty function to load csv for rivers

This commit is contained in:
leie_sistal@yahoo.fr 2024-01-11 23:28:36 +01:00 committed by Claude
parent f73a8906ce
commit af4bca601c
No known key found for this signature in database
2 changed files with 19 additions and 1 deletions

View file

@ -5462,6 +5462,7 @@
class="icon-plus"
></button>
<button id="riverCreateNew" data-tip="Create a new river selecting river cells" class="icon-map-pin"></button>
<button id="loadriverfromcsv" data-tip="Generate river from csv" class="icon-upload"></button>
<button id="riversBasinHighlight" data-tip="Toggle basin highlight mode" class="icon-sitemap"></button>
<button
id="riversExport"

View file

@ -26,6 +26,7 @@ function overviewRivers() {
document.getElementById("riversBasinHighlight").addEventListener("click", toggleBasinsHightlight);
document.getElementById("riversExport").addEventListener("click", downloadRiversData);
document.getElementById("riversRemoveAll").addEventListener("click", triggerAllRiversRemove);
document.getElementById("loadriverfromcsv").addEventListener("click", loadriverfromcsvfunction);
// add line for each river
function riversOverviewAddLines() {
@ -178,7 +179,7 @@ function overviewRivers() {
});
}
function triggerAllRiversRemove() {
function removeAllRivers() {
alertMessage.innerHTML = /* html */ `Are you sure you want to remove all rivers?`;
$("#alert").dialog({
resizable: false,
@ -201,4 +202,20 @@ function overviewRivers() {
rivers.selectAll("*").remove();
riversOverviewAddLines();
}
function loadriverfromcsvfunction() {
alertMessage.innerHTML = /* html */ `Are you sure you want to add river from csv?`;
$("#alert").dialog({
resizable: false,
title: "Import rivers",
buttons: {
Remove: function() {
$(this).dialog("close");
},
Cancel: function() {
$(this).dialog("close");
}
}
});
}
}