diff --git a/assets/ts_src/ajax_ui.ts b/assets/ts_src/ajax_ui.ts index afc562fb..a2e4d913 100644 --- a/assets/ts_src/ajax_ui.ts +++ b/assets/ts_src/ajax_ui.ts @@ -211,6 +211,8 @@ class AjaxUI { enableLinks: false, showIcon: false, showBorder: true, + searchResultBackColor: '#ffc107', + searchResultColor: '#000', onNodeSelected: function(event, data) { if(data.href) { ajaxUI.navigateTo(data.href); @@ -220,6 +222,16 @@ class AjaxUI { expandIcon: "fas fa-plus fa-fw fa-treeview", collapseIcon: "fas fa-minus fa-fw fa-treeview"}) .on('initialized', function() { $(this).treeview('collapseAll', { silent: true }); + + //Implement searching if needed. + if($(this).data('treeSearch')) { + let _this = this; + let $search = $($(this).data('treeSearch')); + $search.on( 'input', function() { + $(_this).treeview('collapseAll', { silent: true }); + $(_this).treeview('search', [$search.val()]); + }); + } }); }); } diff --git a/templates/AdminPages/EntityAdminBase.html.twig b/templates/AdminPages/EntityAdminBase.html.twig index 9cceaf04..9762a519 100644 --- a/templates/AdminPages/EntityAdminBase.html.twig +++ b/templates/AdminPages/EntityAdminBase.html.twig @@ -6,7 +6,7 @@
- +
- + -
+ +
  • -
  • -
  • @@ -262,7 +280,7 @@
    - + {# Back to top buton #}