2024-09-19 01:40:27 +02:00
|
|
|
|
2024-09-26 13:38:25 +02:00
|
|
|
/**
|
|
|
|
*/
|
|
|
|
class class_input_datetime implements lib_plankton.zoo_input.interface_input<_zeitbild.frontend_web.helpers.type_datetime>
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
private core : lib_plankton.zoo_input.class_input_group<_zeitbild.frontend_web.helpers.type_datetime>;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public constructor(
|
|
|
|
prefix : string
|
|
|
|
)
|
|
|
|
{
|
|
|
|
this.core = new lib_plankton.zoo_input.class_input_group<_zeitbild.frontend_web.helpers.type_datetime>(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "timezone_shift",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_number(
|
|
|
|
),
|
|
|
|
"label": (prefix + lib_plankton.translate.get("common.timezone_shift")),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "date",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_date(
|
|
|
|
),
|
|
|
|
"label": (prefix + lib_plankton.translate.get("common.date")),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "time",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_soft<type_time>(
|
|
|
|
new lib_plankton.zoo_input.class_input_time(
|
|
|
|
)
|
|
|
|
),
|
|
|
|
"label": (prefix + lib_plankton.translate.get("common.time")),
|
|
|
|
},
|
|
|
|
]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public async setup(
|
|
|
|
parent : HTMLElement
|
|
|
|
) : Promise<void>
|
|
|
|
{
|
|
|
|
return this.core.setup(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public async read(
|
|
|
|
) : Promise<_zeitbild.frontend_web.helpers.type_datetime>
|
|
|
|
{
|
|
|
|
return this.core.read();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public async write(
|
|
|
|
value : _zeitbild.frontend_web.helpers.type_datetime
|
|
|
|
) : Promise<void>
|
|
|
|
{
|
|
|
|
return this.core.write(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-09-12 00:02:12 +02:00
|
|
|
/**
|
|
|
|
*/
|
2024-09-19 01:40:27 +02:00
|
|
|
namespace _zeitbild.frontend_web
|
2024-09-12 00:02:12 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
export async function main(
|
|
|
|
) : Promise<void>
|
|
|
|
{
|
|
|
|
// conf
|
2024-09-19 10:17:43 +02:00
|
|
|
await _zeitbild.frontend_web.conf.init("conf.json");
|
2024-09-12 00:02:12 +02:00
|
|
|
|
2024-09-26 13:38:25 +02:00
|
|
|
|
2024-09-19 10:17:43 +02:00
|
|
|
// init
|
|
|
|
await _zeitbild.frontend_web.backend.init();
|
2024-09-26 13:38:25 +02:00
|
|
|
await lib_plankton.translate.initialize(
|
|
|
|
{
|
|
|
|
"verbosity": 1,
|
|
|
|
"packages": [
|
|
|
|
JSON.parse(await lib_plankton.file.read("data/localization/deu.loc.json")),
|
|
|
|
JSON.parse(await lib_plankton.file.read("data/localization/eng.loc.json")),
|
|
|
|
],
|
|
|
|
"order": ["deu", "eng"],
|
|
|
|
"autopromote": false,
|
|
|
|
}
|
|
|
|
);
|
2024-09-19 10:17:43 +02:00
|
|
|
lib_plankton.zoo_page.init(
|
|
|
|
document.querySelector("main"),
|
|
|
|
{
|
|
|
|
"pool": {
|
|
|
|
"login": async (parameters, target_element) => {
|
2024-09-19 13:34:24 +02:00
|
|
|
const preparation : {kind : string; data : any;} = await _zeitbild.frontend_web.backend.session_prepare(
|
2024-09-19 10:17:43 +02:00
|
|
|
);
|
2024-09-19 13:34:24 +02:00
|
|
|
switch (preparation.kind) {
|
|
|
|
case "internal": {
|
|
|
|
target_element.innerHTML = await _zeitbild.frontend_web.helpers.template_coin(
|
|
|
|
"login",
|
2024-09-19 10:17:43 +02:00
|
|
|
{
|
2024-09-19 13:34:24 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
const form : lib_plankton.zoo_form.class_form<
|
|
|
|
{name : string; password : string;},
|
|
|
|
{name : string; password : string;}
|
|
|
|
> = new lib_plankton.zoo_form.class_form<
|
|
|
|
{name : string; password : string;},
|
|
|
|
{name : string; password : string;}
|
|
|
|
>(
|
|
|
|
x => x,
|
|
|
|
x => x,
|
|
|
|
new lib_plankton.zoo_input.class_input_group<
|
|
|
|
{name : string; password : string;}
|
|
|
|
>(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_text(),
|
2024-09-26 13:38:25 +02:00
|
|
|
"label": lib_plankton.translate.get("page.login.internal.name"),
|
2024-09-19 13:34:24 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "password",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_password(),
|
2024-09-26 13:38:25 +02:00
|
|
|
"label": lib_plankton.translate.get("page.login.internal.password"),
|
2024-09-19 13:34:24 +02:00
|
|
|
},
|
|
|
|
]
|
|
|
|
),
|
|
|
|
[
|
|
|
|
{
|
2024-09-26 13:38:25 +02:00
|
|
|
"label": lib_plankton.translate.get("page.login.internal.do"),
|
2024-09-19 13:34:24 +02:00
|
|
|
"target": "submit",
|
|
|
|
"procedure": async (get_value, get_representation) => {
|
|
|
|
const value : any = await get_value();
|
|
|
|
try {
|
|
|
|
await _zeitbild.frontend_web.backend.session_begin(
|
|
|
|
value.name,
|
|
|
|
value.password
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "events",
|
|
|
|
"parameters": {}
|
|
|
|
}
|
|
|
|
);
|
2024-09-19 10:17:43 +02:00
|
|
|
}
|
2024-09-19 13:34:24 +02:00
|
|
|
catch (error) {
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "login",
|
|
|
|
"parameters": {
|
|
|
|
"name": value.name,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
2024-09-19 10:17:43 +02:00
|
|
|
}
|
2024-09-19 13:34:24 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
);
|
|
|
|
await form.setup(document.querySelector("#login"));
|
|
|
|
await form.input_write(
|
|
|
|
{
|
|
|
|
"name": (parameters.name ?? ""),
|
|
|
|
"password": "",
|
2024-09-19 10:17:43 +02:00
|
|
|
}
|
2024-09-19 13:34:24 +02:00
|
|
|
);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "oidc": {
|
|
|
|
let element_a : HTMLElement = document.createElement("a");;
|
|
|
|
element_a.textContent = lib_plankton.string.coin(
|
2024-09-26 13:38:25 +02:00
|
|
|
lib_plankton.translate.get("page.login.oidc.via"),
|
2024-09-19 13:34:24 +02:00
|
|
|
{
|
2024-09-26 13:38:25 +02:00
|
|
|
"title": preparation.data.label,
|
2024-09-19 13:34:24 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
element_a.setAttribute("href", preparation.data.url);
|
|
|
|
target_element.innerHTML = "";
|
|
|
|
target_element.appendChild(element_a);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"oidc_finish": async (parameters, target_element) => {
|
|
|
|
await _zeitbild.frontend_web.backend.set_session_key(parameters["session_key"]);
|
|
|
|
lib_plankton.zoo_page.set(
|
2024-09-19 10:17:43 +02:00
|
|
|
{
|
2024-09-19 13:34:24 +02:00
|
|
|
"name": "events",
|
|
|
|
"parameters": {}
|
2024-09-19 10:17:43 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
},
|
|
|
|
"logout": async (parameters, target_element) => {
|
|
|
|
await _zeitbild.frontend_web.backend.session_end(
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "login",
|
|
|
|
"parameters": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
},
|
2024-09-26 13:38:25 +02:00
|
|
|
"calendar_add": async (parameters, target_element) => {
|
|
|
|
target_element.innerHTML = await _zeitbild.frontend_web.helpers.template_coin(
|
|
|
|
"calendar_add",
|
|
|
|
{
|
|
|
|
"label": lib_plankton.translate.get("page.calendar_add.title")
|
|
|
|
}
|
|
|
|
);
|
|
|
|
const form : lib_plankton.zoo_form.class_form<
|
|
|
|
_zeitbild.frontend_web.type.calendar_object,
|
|
|
|
{
|
|
|
|
name : string;
|
|
|
|
access_default_level : string;
|
|
|
|
resource_kind : string;
|
|
|
|
}
|
|
|
|
> = new lib_plankton.zoo_form.class_form<
|
|
|
|
_zeitbild.frontend_web.type.calendar_object,
|
|
|
|
{
|
|
|
|
name : string;
|
|
|
|
access_default_level : string;
|
|
|
|
resource_kind : string;
|
|
|
|
}
|
|
|
|
>(
|
|
|
|
(calendar_object) => ({
|
|
|
|
"name": calendar_object.name,
|
|
|
|
"access_default_level": (() => {
|
|
|
|
switch (calendar_object.access.default_level) {
|
|
|
|
case _zeitbild.frontend_web.type.enum_access_level.none: return "none";
|
|
|
|
case _zeitbild.frontend_web.type.enum_access_level.view: return "view";
|
|
|
|
case _zeitbild.frontend_web.type.enum_access_level.edit: return "edit";
|
|
|
|
case _zeitbild.frontend_web.type.enum_access_level.admin: return "admin";
|
|
|
|
}
|
|
|
|
}) (),
|
|
|
|
"resource_kind": calendar_object.resource.kind,
|
|
|
|
}),
|
|
|
|
(raw) => ({
|
|
|
|
"name": raw.name,
|
|
|
|
"access": {
|
|
|
|
"default_level": (() => {
|
|
|
|
switch (raw.access_default_level) {
|
|
|
|
case "none": return _zeitbild.frontend_web.type.enum_access_level.none;
|
|
|
|
case "view": return _zeitbild.frontend_web.type.enum_access_level.view;
|
|
|
|
case "edit": return _zeitbild.frontend_web.type.enum_access_level.edit;
|
|
|
|
case "admin": return _zeitbild.frontend_web.type.enum_access_level.admin;
|
|
|
|
}
|
|
|
|
}) (),
|
|
|
|
"attributed": lib_plankton.map.hashmap.implementation_map(
|
|
|
|
lib_plankton.map.hashmap.make(
|
|
|
|
x => x.toFixed(0)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
},
|
|
|
|
"resource": (() => {
|
|
|
|
switch (raw.resource_kind) {
|
|
|
|
case "local": {
|
|
|
|
return {
|
|
|
|
"kind": "local",
|
|
|
|
"data": {
|
|
|
|
"events": [],
|
|
|
|
}
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case "caldav": {
|
|
|
|
return {
|
|
|
|
"kind": "caldav",
|
|
|
|
"data": {
|
|
|
|
"url": "", // TODO
|
|
|
|
"read_only": true, // TODO
|
|
|
|
}
|
|
|
|
};
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
throw (new Error("invalid resource kind: " + raw.resource_kind));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}) (),
|
|
|
|
}),
|
|
|
|
new lib_plankton.zoo_input.class_input_group<any>(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_text(),
|
|
|
|
"label": lib_plankton.translate.get("calendar.name")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "access_default_level",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_selection(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"value": "none",
|
|
|
|
"label": lib_plankton.translate.get("access_level.none"),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"value": "view",
|
|
|
|
"label": lib_plankton.translate.get("access_level.view")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"value": "edit",
|
|
|
|
"label": lib_plankton.translate.get("access_level.edit")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"value": "admin",
|
|
|
|
"label": lib_plankton.translate.get("access_level.admin")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
),
|
|
|
|
"label": lib_plankton.string.coin(
|
|
|
|
"{{default_level}}",
|
|
|
|
{
|
|
|
|
"head": lib_plankton.translate.get("calendar.access.access"),
|
|
|
|
"default_level": lib_plankton.translate.get("calendar.access.default_level"),
|
|
|
|
}
|
|
|
|
)
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "resource_kind",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_selection(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"value": "local",
|
|
|
|
"label": lib_plankton.translate.get("resource.kinds.local.title")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"value": "caldav",
|
|
|
|
"label": lib_plankton.translate.get("resource.kinds.caldav.title")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("resource.kind")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
),
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"label": lib_plankton.translate.get("page.calendar_add.actions.do"),
|
|
|
|
"target": "submit",
|
|
|
|
"procedure": async (get_value, get_representation) => {
|
|
|
|
const value : any = await get_value();
|
|
|
|
try {
|
|
|
|
await _zeitbild.frontend_web.backend.calendar_add(
|
|
|
|
value
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "events",
|
|
|
|
"parameters": {}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
catch (error) {
|
|
|
|
// do nothing
|
|
|
|
/*
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "event_add",
|
|
|
|
"parameters": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
);
|
|
|
|
await form.setup(document.querySelector("#calendar_add_form"));
|
|
|
|
},
|
|
|
|
"event_add": async (parameters, target_element) => {
|
|
|
|
const calendar_id : int = parseInt(parameters["calendar_id"]);
|
|
|
|
target_element.innerHTML = await _zeitbild.frontend_web.helpers.template_coin(
|
|
|
|
"event_add",
|
|
|
|
{
|
|
|
|
"label": lib_plankton.translate.get("page.event_add.title")
|
|
|
|
}
|
|
|
|
);
|
|
|
|
const form : lib_plankton.zoo_form.class_form<
|
|
|
|
{
|
|
|
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
|
|
|
event_object : _zeitbild.frontend_web.type.event_object;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
calendar_id : string;
|
|
|
|
name : string;
|
|
|
|
begin : _zeitbild.frontend_web.helpers.type_datetime;
|
|
|
|
end : (null | _zeitbild.frontend_web.helpers.type_datetime);
|
|
|
|
location : (null | string);
|
|
|
|
description : (null | string);
|
|
|
|
}
|
|
|
|
> = new lib_plankton.zoo_form.class_form<
|
|
|
|
{
|
|
|
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
|
|
|
event_object : _zeitbild.frontend_web.type.event_object;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
calendar_id : string;
|
|
|
|
name : string;
|
|
|
|
begin : _zeitbild.frontend_web.helpers.type_datetime;
|
|
|
|
end : (null | _zeitbild.frontend_web.helpers.type_datetime);
|
|
|
|
location : (null | string);
|
|
|
|
description : (null | string);
|
|
|
|
}
|
|
|
|
>(
|
|
|
|
(value) => ({
|
|
|
|
"calendar_id": value.calendar_id.toFixed(0),
|
|
|
|
"name": value.event_object.name,
|
|
|
|
"begin": value.event_object.begin,
|
|
|
|
"end": value.event_object.end,
|
|
|
|
"location": value.event_object.location,
|
|
|
|
"description": value.event_object.description,
|
|
|
|
}),
|
|
|
|
(representation) => ({
|
|
|
|
"calendar_id": parseInt(representation.calendar_id),
|
|
|
|
"event_object": {
|
|
|
|
"name": representation.name,
|
|
|
|
"begin": representation.begin,
|
|
|
|
"end": representation.end,
|
|
|
|
"location": representation.location,
|
|
|
|
"description": representation.description,
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
new lib_plankton.zoo_input.class_input_group<any>(
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"name": "calendar_id",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_selection(
|
|
|
|
(await _zeitbild.frontend_web.backend.calendar_list())
|
|
|
|
.filter(
|
|
|
|
(entry) => (["edit","admin"].includes(entry.access_level))
|
|
|
|
)
|
|
|
|
.map(
|
|
|
|
(entry) => ({
|
|
|
|
"value": entry.id.toFixed(0),
|
|
|
|
"label": entry.name,
|
|
|
|
})
|
|
|
|
)
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("calendar.calendar")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "name",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_text(
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("event.name")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "begin",
|
|
|
|
"input": new class_input_datetime(
|
|
|
|
""
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("event.begin")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "end",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_soft<_zeitbild.frontend_web.helpers.type_datetime>(
|
|
|
|
new class_input_datetime(
|
|
|
|
""
|
|
|
|
)
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("event.end")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "location",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_soft<string>(
|
|
|
|
new lib_plankton.zoo_input.class_input_text(
|
|
|
|
)
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("event.location")
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "description",
|
|
|
|
"input": new lib_plankton.zoo_input.class_input_soft<string>(
|
|
|
|
new lib_plankton.zoo_input.class_input_text(
|
|
|
|
)
|
|
|
|
),
|
|
|
|
"label": lib_plankton.translate.get("event.description")
|
|
|
|
},
|
|
|
|
]
|
|
|
|
),
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"label": lib_plankton.translate.get("page.event_add.actions.do"),
|
|
|
|
"target": "submit",
|
|
|
|
"procedure": async (get_value, get_representation) => {
|
|
|
|
const value : any = await get_value();
|
|
|
|
try {
|
|
|
|
await _zeitbild.frontend_web.backend.calendar_event_add(
|
|
|
|
value.calendar_id,
|
|
|
|
value.event_object
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "events",
|
|
|
|
"parameters": {}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
catch (error) {
|
|
|
|
// do nothing
|
|
|
|
/*
|
|
|
|
lib_plankton.zoo_page.set(
|
|
|
|
{
|
|
|
|
"name": "event_add",
|
|
|
|
"parameters": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]
|
|
|
|
);
|
|
|
|
/*
|
|
|
|
await form.write(
|
|
|
|
{
|
|
|
|
"calendar_id": parameters["calendar_id"],
|
|
|
|
}
|
|
|
|
);
|
|
|
|
*/
|
|
|
|
await form.setup(document.querySelector("#event_add_form"));
|
|
|
|
},
|
2024-09-19 10:17:43 +02:00
|
|
|
"events": async (parameters, target_element) => {
|
|
|
|
const content = await _zeitbild.frontend_web.view.calendar_view_table_html(
|
|
|
|
{
|
|
|
|
"calendar_ids": null,
|
2024-09-19 13:34:24 +02:00
|
|
|
// TODO
|
2024-09-19 10:17:43 +02:00
|
|
|
"from": {
|
|
|
|
"year": 2024,
|
|
|
|
"week": 37
|
|
|
|
},
|
2024-09-19 13:34:24 +02:00
|
|
|
// TODO
|
2024-09-19 10:17:43 +02:00
|
|
|
"to": {
|
|
|
|
"year": 2024,
|
|
|
|
"week": 43
|
|
|
|
},
|
|
|
|
"timezone_shift": /*conf.timezone_shift*/0,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
target_element.innerHTML = content;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"fallback": {
|
|
|
|
"name": "login",
|
|
|
|
"parameters": {}
|
|
|
|
}
|
|
|
|
}
|
2024-09-12 00:02:12 +02:00
|
|
|
);
|
2024-09-21 10:56:46 +02:00
|
|
|
lib_plankton.zoo_page.add_nav_entry(
|
|
|
|
{"name": "login", "parameters": {}},
|
2024-09-26 13:38:25 +02:00
|
|
|
{"label": lib_plankton.translate.get("page.login.title")}
|
|
|
|
);
|
2024-09-21 10:56:46 +02:00
|
|
|
lib_plankton.zoo_page.add_nav_entry(
|
|
|
|
{"name": "events", "parameters": {}},
|
2024-09-26 13:38:25 +02:00
|
|
|
{"label": lib_plankton.translate.get("page.events.title")}
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.add_nav_entry(
|
|
|
|
{"name": "calendar_add", "parameters": {}},
|
|
|
|
{"label": lib_plankton.translate.get("page.calendar_add.title")}
|
|
|
|
);
|
|
|
|
lib_plankton.zoo_page.add_nav_entry(
|
|
|
|
{"name": "event_add", "parameters": {}},
|
|
|
|
{"label": lib_plankton.translate.get("page.event_add.title")}
|
|
|
|
);
|
2024-09-21 10:56:46 +02:00
|
|
|
lib_plankton.zoo_page.add_nav_entry(
|
|
|
|
{"name": "logout", "parameters": {}},
|
2024-09-26 13:38:25 +02:00
|
|
|
{"label": lib_plankton.translate.get("page.logout.title")}
|
|
|
|
);
|
2024-09-12 00:02:12 +02:00
|
|
|
|
|
|
|
// exec
|
2024-09-19 10:17:43 +02:00
|
|
|
lib_plankton.zoo_page.start();
|
2024-09-12 00:02:12 +02:00
|
|
|
|
|
|
|
return Promise.resolve<void>(undefined);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|