Get tree working in admin

This commit is contained in:
nathan 2024-02-15 14:32:40 -07:00
parent 79bcabc888
commit 976c5261a9
2 changed files with 11 additions and 1 deletions

View File

@ -559,7 +559,7 @@ class admin_ui
{
$data['id'] = $root.($app == 'admin' ? 'admin' : 'apps/'.$app).'/';
$matches = null;
if (preg_match_all('/(menuaction|load)=([^&]+)/', $data['link'], $matches))
if(preg_match_all('/(menuaction|load)=([^&\',]+)/', $data['link'], $matches))
{
$data[Tree::ID] .= $matches[2][(int)array_search('load', $matches[1])];
}

View File

@ -536,6 +536,16 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
item.focused = true
}
public openItem(_id)
{
let item = this.getNode(_id);
if(item)
{
item.open = true;
}
this.requestUpdate();
}
/**
* hasChildren
*