Use bs-info color from bootstrap css variable for search highlighting in treeview.

This commit is contained in:
Jan Böhmer 2022-07-24 23:47:12 +02:00
parent 49d9635a79
commit 156301b8a4

View file

@ -152,6 +152,9 @@ const SidebarHelper = class {
* @param url The url from where the data should be loaded * @param url The url from where the data should be loaded
*/ */
initTree(tree, url) { initTree(tree, url) {
//Get primary color from css variable
const primary_color = getComputedStyle(document.documentElement).getPropertyValue('--bs-info');
//let contextmenu_handler = this.onNodeContextmenu; //let contextmenu_handler = this.onNodeContextmenu;
$.getJSON(this.BASE + url, function (data) { $.getJSON(this.BASE + url, function (data) {
// @ts-ignore // @ts-ignore
@ -160,7 +163,7 @@ const SidebarHelper = class {
enableLinks: true, enableLinks: true,
showIcon: false, showIcon: false,
showBorder: true, showBorder: true,
searchResultBackColor: '#ffc107', searchResultBackColor: primary_color,
searchResultColor: '#000', searchResultColor: '#000',
onNodeSelected: function(event, data) { onNodeSelected: function(event, data) {
if(data.href) { if(data.href) {