mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
fix bug in Et2Tree where tree would not consider imagePath
This commit is contained in:
parent
b7f7f3b0bd
commit
5a021bdae8
@ -113,7 +113,7 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
|||||||
@property({type: Function})
|
@property({type: Function})
|
||||||
onopenend //description: "Javascript function executed when opening a node is finished: function(_id, _widget, _hasChildren)"
|
onopenend //description: "Javascript function executed when opening a node is finished: function(_id, _widget, _hasChildren)"
|
||||||
@property({type: String})
|
@property({type: String})
|
||||||
imagePath: String = egw().webserverUrl + "/api/templates/default/images/dhtmlxtree/" //TODO we will need a different path here! maybe just rename the path?
|
imagePath: string = egw().webserverUrl + "/api/templates/default/images/dhtmlxtree/" //TODO we will need a different path here! maybe just rename the path?
|
||||||
// description: "Directory for tree structure images, set on server-side to 'dhtmlx' subdir of templates image-directory"
|
// description: "Directory for tree structure images, set on server-side to 'dhtmlx' subdir of templates image-directory"
|
||||||
@property()
|
@property()
|
||||||
value = []
|
value = []
|
||||||
@ -871,6 +871,11 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement) implements Fin
|
|||||||
//sl-icon images need to be svgs if there is a png try to find the corresponding svg
|
//sl-icon images need to be svgs if there is a png try to find the corresponding svg
|
||||||
img = img.replace(".png", ".svg");
|
img = img.replace(".png", ".svg");
|
||||||
}
|
}
|
||||||
|
//append image path if it was not set by the server already
|
||||||
|
if (!img.startsWith(this.imagePath))
|
||||||
|
{
|
||||||
|
img = this.imagePath + img;
|
||||||
|
}
|
||||||
|
|
||||||
// lazy iff "child" is set and "item" is empty or item does not exist in the first place
|
// lazy iff "child" is set and "item" is empty or item does not exist in the first place
|
||||||
const lazy = (selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item)
|
const lazy = (selectOption.item?.length === 0 && selectOption.child) || (selectOption.child && !selectOption.item)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user