mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 23:09:13 +01:00
493a2432fa
- Rename EgwApp to EgwFrameworkApp to avoid confusion with api/js/jsapi/EgwApp - Continued work on narrow screen styles
25 lines
714 B
TypeScript
25 lines
714 B
TypeScript
/**
|
|
* app.ts is auto-built
|
|
*/
|
|
|
|
import "./EgwFramework";
|
|
import "./EgwFrameworkApp";
|
|
|
|
|
|
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);
|
|
});
|
|
|
|
/* 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);
|
|
});
|
|
}); |