mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Use bs-info color from bootstrap css variable for search highlighting in treeview.
This commit is contained in:
parent
49d9635a79
commit
156301b8a4
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue