diff --git a/api/js/etemplate/Et2Image/Et2Image.md b/api/js/etemplate/Et2Image/Et2Image.md new file mode 100644 index 0000000000..94d95e29ec --- /dev/null +++ b/api/js/etemplate/Et2Image/Et2Image.md @@ -0,0 +1,6 @@ +EGroupware uses icons provided by [Bootrap Icons](icons.getbootstrap.com), as well as some of our own. You can add your +own images in as well. + +```html:preview + +``` diff --git a/api/js/etemplate/Et2Image/Et2Image.ts b/api/js/etemplate/Et2Image/Et2Image.ts index ce9926e390..3ef62cab1c 100644 --- a/api/js/etemplate/Et2Image/Et2Image.ts +++ b/api/js/etemplate/Et2Image/Et2Image.ts @@ -13,6 +13,7 @@ import {Et2Widget} from "../Et2Widget/Et2Widget"; import {et2_IDetachedDOM} from "../et2_core_interfaces"; import {property} from "lit/decorators/property.js"; import {customElement} from "lit/decorators/custom-element.js"; +import "../../jsapi/egw_images.js"; @customElement("et2-image") export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM @@ -198,7 +199,7 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM { return img_href; } - let src = this.egw()?.image(img_href); + let src = this.egw() && typeof this.egw().image == "function" ? this.egw()?.image(img_href) : ""; if(src) { return src; diff --git a/doc/etemplate2/_includes/default.njk b/doc/etemplate2/_includes/default.njk index bf14797015..bd42401611 100644 --- a/doc/etemplate2/_includes/default.njk +++ b/doc/etemplate2/_includes/default.njk @@ -42,6 +42,7 @@ + {# Set the initial theme and menu states here to prevent flashing #}