Handle rename with context menu on the first taxon ie. the root one

Also rename the main input field (sort of title) when updating the root taxon name with contextual menu
This commit is contained in:
Jean-Baptiste Bellet
2022-06-02 16:03:16 +02:00
parent 4bbbae68c7
commit 68bd1df312

View File

@@ -49,6 +49,8 @@ handle_rename = (e, data) ->
last_rollback = data.rlbk
node = data.rslt.obj
name = data.rslt.new_name
# change the name inside the main input field as well if taxon is the root one
document.getElementById("taxonomy_name").value = name if node.parents("[id]").attr("id") == "taxonomy_tree"
url = new URL(base_url)
url.pathname = url.pathname + '/' + node.attr("id")