#268 added wunderbaum 0.12.0

This commit is contained in:
Roland Gruber 2025-02-12 20:35:48 +01:00
parent 90c0d4e9aa
commit a010e943bc
4 changed files with 16 additions and 12 deletions

View file

@ -1656,7 +1656,7 @@ class TreeView {
* @return int result * @return int result
*/ */
function compareNodeByIdAsDn($a, $b): int { function compareNodeByIdAsDn($a, $b): int {
return strnatcasecmp(extractRDN(base64_decode($a['id'])), extractRDN(base64_decode($b['id']))); return strnatcasecmp(extractRDN(base64_decode($a['key'])), extractRDN(base64_decode($b['key'])));
} }
/** /**

View file

@ -948,6 +948,10 @@ i.wb-icon {
margin-right: 5px; margin-right: 5px;
} }
:root {
--wb-node-text-color: var(--lam-text-color-default) !important;
}
div.swal2-html-container { div.swal2-html-container {
overflow: visible; overflow: visible;
} }

View file

@ -2934,16 +2934,16 @@ window.lam.treeview.searchResults = function (event, tokenName, tokenValue, dn)
* @param tree tree object * @param tree tree object
* @param ids array of node IDs. * @param ids array of node IDs.
*/ */
window.lam.treeview.openInitial = function(tree, ids) { window.lam.treeview.openInitial = async function (tree, ids) {
if (ids.length === 0) { if (ids.length === 0) {
return; return;
} }
const firstNodeId = ids.shift(); for (const id of ids) {
tree.open_node(firstNodeId, function() { const node = tree.findKey(id);
window.lam.treeview.openInitial(tree, ids); if (node) {
}); await node.setExpanded();
if (ids.length === 0) { await node.setActive();
tree.select_node(firstNodeId); }
} }
} }

View file

@ -129,10 +129,10 @@ function showTree(): void {
id: "ldap_tree", id: "ldap_tree",
debugLevel: 2, debugLevel: 2,
source: "../misc/ajax.php?function=treeview&command=getRootNodes", source: "../misc/ajax.php?function=treeview&command=getRootNodes",
// Event handlers: init: (e) => {
/*init: (e) => { tree.expandAll(true, {depth: 1, });
//window.lam.treeview.openInitial(tree, ' . $openInitialJsArray . '); window.lam.treeview.openInitial(tree, ' . $openInitialJsArray . ');
},*/ },
lazyLoad: function(e) { lazyLoad: function(e) {
return {url: "../misc/ajax.php?function=treeview&command=getNodes&dn=" + e.node.key}; return {url: "../misc/ajax.php?function=treeview&command=getNodes&dn=" + e.node.key};
}, },