2024-04-25 19:35:34 +02:00
|
|
|
/**
|
|
|
|
* app.ts is auto-built
|
|
|
|
*/
|
|
|
|
|
|
|
|
import "./EgwFramework";
|
2024-04-30 18:18:09 +02:00
|
|
|
import "./EgwFrameworkApp";
|
2024-04-25 19:35:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () =>
|
|
|
|
{
|
|
|
|
/* Set up listener on avatar menu */
|
|
|
|
const avatarMenu = document.querySelector("#topmenu_info_user_avatar");
|
|
|
|
avatarMenu.addEventListener("sl-select", (e : CustomEvent) =>
|
|
|
|
{
|
|
|
|
window.egw.open_link(e.detail.item.value);
|
|
|
|
});
|
2024-04-26 18:13:24 +02:00
|
|
|
|
|
|
|
/* Listener on placeholder checkbox */
|
|
|
|
// TODO: Remove this & the switch
|
|
|
|
document.querySelector("#placeholders").addEventListener("sl-change", (e) =>
|
|
|
|
{
|
|
|
|
document.querySelector("egw-framework").classList.toggle("placeholder", e.target.checked);
|
|
|
|
document.querySelector("egw-app").classList.toggle("placeholder", e.target.checked);
|
|
|
|
});
|
2024-04-25 19:35:34 +02:00
|
|
|
});
|