[add] page:event_edit [mod] page:events
This commit is contained in:
parent
2e4d06ee60
commit
8b33fa8e25
12 changed files with 326 additions and 23 deletions
|
@ -38,6 +38,9 @@
|
||||||
"page.calendar_add.title": "Kalendar anlegen",
|
"page.calendar_add.title": "Kalendar anlegen",
|
||||||
"page.calendar_add.actions.do": "anlegen",
|
"page.calendar_add.actions.do": "anlegen",
|
||||||
"page.event_add.title": "Termin anlegen",
|
"page.event_add.title": "Termin anlegen",
|
||||||
"page.event_add.actions.do": "anlegen"
|
"page.event_add.actions.do": "anlegen",
|
||||||
|
"page.event_edit.title": "Termin ändern",
|
||||||
|
"page.event_edit.actions.change": "ändern",
|
||||||
|
"page.event_edit.actions.remove": "löschen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,9 @@
|
||||||
"page.calendar_add.title": "Add calendar",
|
"page.calendar_add.title": "Add calendar",
|
||||||
"page.calendar_add.actions.do": "anlegen",
|
"page.calendar_add.actions.do": "anlegen",
|
||||||
"page.event_add.title": "Add event",
|
"page.event_add.title": "Add event",
|
||||||
"page.event_add.actions.do": "anlegen"
|
"page.event_add.actions.do": "add",
|
||||||
|
"page.event_edit.title": "Change event",
|
||||||
|
"page.event_edit.actions.change": "change",
|
||||||
|
"page.event_edit.actions.remove": "delete"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,6 +281,27 @@ namespace _zeitbild.frontend_web.backend
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
export async function calendar_event_get(
|
||||||
|
calendar_id : _zeitbild.frontend_web.type.calendar_id,
|
||||||
|
event_id : _zeitbild.frontend_web.type.local_resource_event_id
|
||||||
|
) : Promise<_zeitbild.frontend_web.type.event_object>
|
||||||
|
{
|
||||||
|
return call(
|
||||||
|
lib_plankton.http.enum_method.get,
|
||||||
|
lib_plankton.string.coin(
|
||||||
|
"/calendar/{{calendar_id}}/event/{{event_id}}",
|
||||||
|
{
|
||||||
|
"calendar_id": calendar_id.toFixed(0),
|
||||||
|
"event_id": event_id.toFixed(0),
|
||||||
|
}
|
||||||
|
),
|
||||||
|
null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
export async function calendar_event_add(
|
export async function calendar_event_add(
|
||||||
|
@ -302,11 +323,32 @@ namespace _zeitbild.frontend_web.backend
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo event id type
|
*/
|
||||||
|
export async function calendar_event_change(
|
||||||
|
calendar_id : _zeitbild.frontend_web.type.calendar_id,
|
||||||
|
event_id : _zeitbild.frontend_web.type.local_resource_event_id,
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object
|
||||||
|
) : Promise<void>
|
||||||
|
{
|
||||||
|
return call(
|
||||||
|
lib_plankton.http.enum_method.put,
|
||||||
|
lib_plankton.string.coin(
|
||||||
|
"/calendar/{{calendar_id}}/event/{{event_id}}",
|
||||||
|
{
|
||||||
|
"calendar_id": calendar_id.toFixed(0),
|
||||||
|
"event_id": event_id.toFixed(0),
|
||||||
|
}
|
||||||
|
),
|
||||||
|
event_object
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
*/
|
*/
|
||||||
export async function calendar_event_remove(
|
export async function calendar_event_remove(
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id,
|
calendar_id : _zeitbild.frontend_web.type.calendar_id,
|
||||||
event_id : int
|
event_id : _zeitbild.frontend_web.type.local_resource_event_id
|
||||||
) : Promise<void>
|
) : Promise<void>
|
||||||
{
|
{
|
||||||
return call(
|
return call(
|
||||||
|
@ -337,7 +379,8 @@ namespace _zeitbild.frontend_web.backend
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
calendar_name : string;
|
calendar_name : string;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
|
@ -10,11 +10,18 @@ namespace _zeitbild.frontend_web
|
||||||
) : Promise<void>
|
) : Promise<void>
|
||||||
{
|
{
|
||||||
// conf
|
// conf
|
||||||
await _zeitbild.frontend_web.conf.init("conf.json");
|
await _zeitbild.frontend_web.conf.init(
|
||||||
|
"conf.json"
|
||||||
|
);
|
||||||
|
|
||||||
// init
|
// init
|
||||||
await _zeitbild.frontend_web.backend.init();
|
lib_plankton.log.conf_push(
|
||||||
|
[
|
||||||
|
lib_plankton.log.channel_make({"kind": "console", "data": {"threshold": "info"}}),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
await _zeitbild.frontend_web.backend.init(
|
||||||
|
);
|
||||||
await lib_plankton.translate.initialize(
|
await lib_plankton.translate.initialize(
|
||||||
{
|
{
|
||||||
"verbosity": 1,
|
"verbosity": 1,
|
||||||
|
|
|
@ -54,6 +54,11 @@ namespace _zeitbild.frontend_web.type
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
export type local_resource_event_id = int;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
export type resource_id = int;
|
export type resource_id = int;
|
||||||
|
|
|
@ -165,7 +165,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
entries : Array<
|
entries : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
today : boolean;
|
today : boolean;
|
||||||
|
@ -203,7 +204,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
calendar_name : string;
|
calendar_name : string;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
> = await _zeitbild.frontend_web.backend.events(
|
> = await _zeitbild.frontend_web.backend.events(
|
||||||
from_pit,
|
from_pit,
|
||||||
|
@ -228,7 +230,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
entries : Array<
|
entries : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
today : boolean;
|
today : boolean;
|
||||||
|
@ -265,7 +268,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
entries : Array<
|
entries : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
today : boolean;
|
today : boolean;
|
||||||
|
@ -323,7 +327,7 @@ namespace _zeitbild.frontend_web.view
|
||||||
.forEach(
|
.forEach(
|
||||||
(entry) => {
|
(entry) => {
|
||||||
const distance_seconds : int = (
|
const distance_seconds : int = (
|
||||||
lib_plankton.pit.from_datetime(entry.event.begin)
|
lib_plankton.pit.from_datetime(entry.event_object.begin)
|
||||||
-
|
-
|
||||||
from_pit
|
from_pit
|
||||||
);
|
);
|
||||||
|
@ -384,6 +388,14 @@ namespace _zeitbild.frontend_web.view
|
||||||
week : int;
|
week : int;
|
||||||
};
|
};
|
||||||
timezone_shift ?: int;
|
timezone_shift ?: int;
|
||||||
|
action_select ?: (
|
||||||
|
(
|
||||||
|
calendar_id : _zeitbild.frontend_web.type.calendar_id,
|
||||||
|
event_id : _zeitbild.frontend_web.type.local_resource_event_id
|
||||||
|
)
|
||||||
|
=>
|
||||||
|
void
|
||||||
|
)
|
||||||
} = {}
|
} = {}
|
||||||
) : Promise<string>
|
) : Promise<string>
|
||||||
{
|
{
|
||||||
|
@ -427,7 +439,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
entries : Array<
|
entries : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
today : boolean;
|
today : boolean;
|
||||||
|
@ -556,9 +569,22 @@ namespace _zeitbild.frontend_web.view
|
||||||
sources.get(
|
sources.get(
|
||||||
entry.calendar_id
|
entry.calendar_id
|
||||||
).name,
|
).name,
|
||||||
entry.event
|
entry.event_object
|
||||||
|
),
|
||||||
|
"name": entry.event_object.name,
|
||||||
|
"rel": lib_plankton.string.coin(
|
||||||
|
"{{calendar_id}}/{{event_id}}",
|
||||||
|
{
|
||||||
|
"calendar_id": entry.calendar_id.toFixed(0),
|
||||||
|
"event_id": (
|
||||||
|
(entry.event_id === null)
|
||||||
|
?
|
||||||
|
"-"
|
||||||
|
:
|
||||||
|
entry.event_id.toFixed(0)
|
||||||
|
),
|
||||||
|
}
|
||||||
),
|
),
|
||||||
"name": entry.event.name,
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -592,7 +618,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
Array<
|
Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
@ -620,7 +647,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
const entries : Array<
|
const entries : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
> = await _zeitbild.frontend_web.backend.events(
|
> = await _zeitbild.frontend_web.backend.events(
|
||||||
(options.from as lib_plankton.pit.type_pit),
|
(options.from as lib_plankton.pit.type_pit),
|
||||||
|
@ -632,9 +660,9 @@ namespace _zeitbild.frontend_web.view
|
||||||
// TODO: optimize
|
// TODO: optimize
|
||||||
entries.sort(
|
entries.sort(
|
||||||
(entry_1, entry_2) => (
|
(entry_1, entry_2) => (
|
||||||
lib_plankton.pit.from_datetime(entry_1.event.begin)
|
lib_plankton.pit.from_datetime(entry_1.event_object.begin)
|
||||||
-
|
-
|
||||||
lib_plankton.pit.from_datetime(entry_2.event.begin)
|
lib_plankton.pit.from_datetime(entry_2.event_object.begin)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -656,7 +684,8 @@ namespace _zeitbild.frontend_web.view
|
||||||
const stuff : Array<
|
const stuff : Array<
|
||||||
{
|
{
|
||||||
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
calendar_id : _zeitbild.frontend_web.type.calendar_id;
|
||||||
event : _zeitbild.frontend_web.type.event_object;
|
event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id);
|
||||||
|
event_object : _zeitbild.frontend_web.type.event_object;
|
||||||
}
|
}
|
||||||
> = await calendar_view_list_data(
|
> = await calendar_view_list_data(
|
||||||
calendar_ids,
|
calendar_ids,
|
||||||
|
|
179
source/pages/event_edit/logic.ts
Normal file
179
source/pages/event_edit/logic.ts
Normal file
|
@ -0,0 +1,179 @@
|
||||||
|
namespace _zeitbild.frontend_web.pages
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
lib_plankton.zoo_page.register(
|
||||||
|
"event_edit",
|
||||||
|
async (parameters, target_element) => {
|
||||||
|
const calendar_id : int = parseInt(parameters["calendar_id"]);
|
||||||
|
const event_id : int = parseInt(parameters["event_id"]);
|
||||||
|
target_element.innerHTML = await _zeitbild.frontend_web.helpers.template_coin(
|
||||||
|
"event_edit",
|
||||||
|
{
|
||||||
|
"label": lib_plankton.translate.get("page.event_edit.title")
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const form : lib_plankton.zoo_form.class_form<
|
||||||
|
_zeitbild.frontend_web.type.event_object,
|
||||||
|
{
|
||||||
|
name : string;
|
||||||
|
begin : lib_plankton.pit.type_datetime;
|
||||||
|
end : (null | lib_plankton.pit.type_datetime);
|
||||||
|
location : (null | string);
|
||||||
|
description : (null | string);
|
||||||
|
}
|
||||||
|
> = new lib_plankton.zoo_form.class_form<
|
||||||
|
_zeitbild.frontend_web.type.event_object,
|
||||||
|
{
|
||||||
|
name : string;
|
||||||
|
begin : lib_plankton.pit.type_datetime;
|
||||||
|
end : (null | lib_plankton.pit.type_datetime);
|
||||||
|
location : (null | string);
|
||||||
|
description : (null | string);
|
||||||
|
}
|
||||||
|
>(
|
||||||
|
(value) => ({
|
||||||
|
"name": value.name,
|
||||||
|
"begin": value.begin,
|
||||||
|
"end": value.end,
|
||||||
|
"location": value.location,
|
||||||
|
"description": value.description,
|
||||||
|
}),
|
||||||
|
(representation) => ({
|
||||||
|
"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": "name",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_text(
|
||||||
|
),
|
||||||
|
"label": lib_plankton.translate.get("event.name")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "begin",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_datetime(
|
||||||
|
{
|
||||||
|
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||||
|
"label_date": lib_plankton.translate.get("common.date"),
|
||||||
|
"label_time": lib_plankton.translate.get("common.time"),
|
||||||
|
}
|
||||||
|
),
|
||||||
|
"label": lib_plankton.translate.get("event.begin")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "end",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_soft<lib_plankton.pit.type_datetime>(
|
||||||
|
new lib_plankton.zoo_input.class_input_datetime(
|
||||||
|
{
|
||||||
|
"label_timezone_shift": lib_plankton.translate.get("common.timezone_shift"),
|
||||||
|
"label_date": lib_plankton.translate.get("common.date"),
|
||||||
|
"label_time": lib_plankton.translate.get("common.time"),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
|
"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_edit.actions.change"),
|
||||||
|
"target": "submit",
|
||||||
|
"procedure": async (get_value, get_representation) => {
|
||||||
|
const value : any = await get_value();
|
||||||
|
try {
|
||||||
|
await _zeitbild.frontend_web.backend.calendar_event_change(
|
||||||
|
calendar_id,
|
||||||
|
event_id,
|
||||||
|
value
|
||||||
|
);
|
||||||
|
lib_plankton.zoo_page.set(
|
||||||
|
{
|
||||||
|
"name": "events",
|
||||||
|
"parameters": {}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
lib_plankton.log.warning("page_event_edit_error", {"error": String(error)});
|
||||||
|
// do nothing
|
||||||
|
/*
|
||||||
|
lib_plankton.zoo_page.set(
|
||||||
|
{
|
||||||
|
"name": "event_add",
|
||||||
|
"parameters": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": lib_plankton.translate.get("page.event_edit.actions.remove"),
|
||||||
|
"target": "submit",
|
||||||
|
"procedure": async (get_value, get_representation) => {
|
||||||
|
try {
|
||||||
|
await _zeitbild.frontend_web.backend.calendar_event_remove(
|
||||||
|
calendar_id,
|
||||||
|
event_id
|
||||||
|
);
|
||||||
|
lib_plankton.zoo_page.set(
|
||||||
|
{
|
||||||
|
"name": "events",
|
||||||
|
"parameters": {}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
lib_plankton.log.warning("page_event_edit_error", {"error": String(error)});
|
||||||
|
// do nothing
|
||||||
|
/*
|
||||||
|
lib_plankton.zoo_page.set(
|
||||||
|
{
|
||||||
|
"name": "event_add",
|
||||||
|
"parameters": {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
await form.setup(document.querySelector("#event_edit_form"));
|
||||||
|
const event_object : _zeitbild.frontend_web.type.event_object = await _zeitbild.frontend_web.backend.calendar_event_get(
|
||||||
|
calendar_id,
|
||||||
|
event_id
|
||||||
|
);
|
||||||
|
await form.input_write(
|
||||||
|
event_object
|
||||||
|
);
|
||||||
|
return Promise.resolve<void>(undefined);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
0
source/pages/event_edit/structure.html.tpl
Normal file
0
source/pages/event_edit/structure.html.tpl
Normal file
|
@ -6,7 +6,7 @@ namespace _zeitbild.frontend_web.pages
|
||||||
lib_plankton.zoo_page.register(
|
lib_plankton.zoo_page.register(
|
||||||
"events",
|
"events",
|
||||||
async (parameters, target_element) => {
|
async (parameters, target_element) => {
|
||||||
const content = await _zeitbild.frontend_web.view.calendar_view_table_html(
|
const content : string = await _zeitbild.frontend_web.view.calendar_view_table_html(
|
||||||
{
|
{
|
||||||
"calendar_ids": null,
|
"calendar_ids": null,
|
||||||
// TODO
|
// TODO
|
||||||
|
@ -23,6 +23,34 @@ namespace _zeitbild.frontend_web.pages
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
target_element.innerHTML = content;
|
target_element.innerHTML = content;
|
||||||
|
target_element.querySelectorAll(".calendar-event_entry").forEach(
|
||||||
|
(element) => {
|
||||||
|
element.addEventListener(
|
||||||
|
"click",
|
||||||
|
() => {
|
||||||
|
const rel : string = element.getAttribute("rel");
|
||||||
|
const parts : Array<string> = rel.split("/");
|
||||||
|
const calendar_id : _zeitbild.frontend_web.type.calendar_id = parseInt(parts[0]);
|
||||||
|
const event_id : (null | _zeitbild.frontend_web.type.local_resource_event_id) = (
|
||||||
|
(parts[1] === "-")
|
||||||
|
?
|
||||||
|
null
|
||||||
|
:
|
||||||
|
parseInt(parts[1])
|
||||||
|
);
|
||||||
|
lib_plankton.zoo_page.set(
|
||||||
|
{
|
||||||
|
"name": "event_edit",
|
||||||
|
"parameters": {
|
||||||
|
"calendar_id": calendar_id,
|
||||||
|
"event_id": event_id,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
return Promise.resolve<void>(undefined);
|
return Promise.resolve<void>(undefined);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
5
source/templates/event_edit.html.tpl
Normal file
5
source/templates/event_edit.html.tpl
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<div id="event_edit">
|
||||||
|
<h2>{{label}}</h2>
|
||||||
|
<div id="event_edit_form">
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,3 +1,3 @@
|
||||||
<li class="calendar-event_entry" style="background-color: {{color}};" title="{{title}}">
|
<li class="calendar-event_entry" style="background-color: {{color}};" title="{{title}}" rel="{{rel}}">
|
||||||
{{name}}
|
{{name}}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -57,6 +57,7 @@ ${dir_temp}/logic-unlinked.js: \
|
||||||
${dir_source}/pages/oidc_finish/logic.ts \
|
${dir_source}/pages/oidc_finish/logic.ts \
|
||||||
${dir_source}/pages/calendar_add/logic.ts \
|
${dir_source}/pages/calendar_add/logic.ts \
|
||||||
${dir_source}/pages/event_add/logic.ts \
|
${dir_source}/pages/event_add/logic.ts \
|
||||||
|
${dir_source}/pages/event_edit/logic.ts \
|
||||||
${dir_source}/pages/events/logic.ts \
|
${dir_source}/pages/events/logic.ts \
|
||||||
${dir_source}/logic/main.ts
|
${dir_source}/logic/main.ts
|
||||||
@ ${cmd_log} "logic | compile …"
|
@ ${cmd_log} "logic | compile …"
|
||||||
|
|
Loading…
Add table
Reference in a new issue