feat: add link preview capability to tree view

This commit is contained in:
David Arnold 2024-01-03 23:57:26 +01:00
parent 04acd0bda4
commit 94d2c0af2b
No known key found for this signature in database
GPG key ID: AB15A6AF1101390D

View file

@ -273,7 +273,11 @@ frappe.ui.Tree = class {
}
$(icon_html).appendTo(node.$tree_link);
$(`<a class="tree-label"> ${this.get_node_label(node)}</a>`).appendTo(node.$tree_link);
$(
`<a class="tree-label" data-doctype="${this.args.doctype}" data-name="${
node.label
}"> ${this.get_node_label(node)}</a>`
).appendTo(node.$tree_link);
node.$tree_link.on("click", () => {
setTimeout(() => {