[mod] loc
This commit is contained in:
parent
e1a241c433
commit
ed0a40d951
12 changed files with 66 additions and 29 deletions
|
@ -4,6 +4,12 @@
|
||||||
},
|
},
|
||||||
"tree": {
|
"tree": {
|
||||||
"common.not_used": "nicht verwendet",
|
"common.not_used": "nicht verwendet",
|
||||||
|
"page.login.title": "Anmelden",
|
||||||
|
"page.login.name": "Name",
|
||||||
|
"page.login.password": "Passwort",
|
||||||
|
"page.login.submit": "Anmelden",
|
||||||
|
"page.create.title": "Mitglied anlegen",
|
||||||
|
"page.list.title": "Mitglieder-Liste",
|
||||||
"page.view.title": "Mitglied",
|
"page.view.title": "Mitglied",
|
||||||
"page.view.form.field.membership_number.label": "Mitgliedsnummer",
|
"page.view.form.field.membership_number.label": "Mitgliedsnummer",
|
||||||
"page.view.form.field.name_real_value.label": "Echter Name",
|
"page.view.form.field.name_real_value.label": "Echter Name",
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
},
|
},
|
||||||
"tree": {
|
"tree": {
|
||||||
"common.not_used": "not used",
|
"common.not_used": "not used",
|
||||||
|
"page.login.title": "Login",
|
||||||
|
"page.login.name": "name",
|
||||||
|
"page.login.password": "password",
|
||||||
|
"page.login.submit": "login",
|
||||||
|
"page.create.title": "Create member",
|
||||||
|
"page.list.title": "Member list",
|
||||||
"page.view.title": "Member",
|
"page.view.title": "Member",
|
||||||
"page.view.form.field.membership_number.label": "membership number",
|
"page.view.form.field.membership_number.label": "membership number",
|
||||||
"page.view.form.field.name_real_value.label": "real name",
|
"page.view.form.field.name_real_value.label": "real name",
|
||||||
|
|
|
@ -65,11 +65,11 @@ function setup_nav(
|
||||||
entries.forEach(
|
entries.forEach(
|
||||||
entry => {
|
entry => {
|
||||||
let dom_li : HTMLElement = document.createElement("li");
|
let dom_li : HTMLElement = document.createElement("li");
|
||||||
|
entry.classes.forEach(class_ => {dom_li.classList.add(class_);});
|
||||||
{
|
{
|
||||||
let dom_a : HTMLElement = document.createElement("a");
|
let dom_a : HTMLElement = document.createElement("a");
|
||||||
dom_a.textContent = entry.label;
|
dom_a.textContent = entry.label;
|
||||||
dom_a.setAttribute("href", lib_plankton.zoo_page.encode(entry.location));
|
dom_a.setAttribute("href", lib_plankton.zoo_page.encode(entry.location));
|
||||||
entry.classes.forEach(class_ => {dom_a.classList.add(class_);});
|
|
||||||
dom_li.appendChild(dom_a);
|
dom_li.appendChild(dom_a);
|
||||||
}
|
}
|
||||||
dom_ul.appendChild(dom_li);
|
dom_ul.appendChild(dom_li);
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
lib_plankton.zoo_page.register(
|
lib_plankton.zoo_page.register(
|
||||||
"create",
|
"create",
|
||||||
(parameters, target_element) => {
|
(parameters, target_element) => {
|
||||||
|
target_element.appendChild(template_request("create"));
|
||||||
|
|
||||||
|
target_element.querySelector(".create-title").textContent = lib_plankton.translate.get("page.create.title");
|
||||||
|
|
||||||
const form = new lib_plankton.zoo_form.class_form<
|
const form = new lib_plankton.zoo_form.class_form<
|
||||||
{
|
{
|
||||||
membership_number : string;
|
membership_number : string;
|
||||||
|
@ -53,6 +57,6 @@ lib_plankton.zoo_page.register(
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
form.setup(target_element as HTMLElement);
|
form.setup(target_element.querySelector(".create-form") as HTMLElement);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<template id="create">
|
||||||
|
<h2 class="create-title"></h2>
|
||||||
|
<div class="create-form"></div>
|
||||||
|
</template>
|
|
@ -10,6 +10,11 @@ lib_plankton.zoo_page.register(
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const term : (null | string) = (parameters["term"] ?? "");
|
const term : (null | string) = (parameters["term"] ?? "");
|
||||||
|
|
||||||
|
target_element.appendChild(template_request("list"));
|
||||||
|
|
||||||
|
target_element.querySelector(".list-title").textContent = lib_plankton.translate.get("page.list.title");
|
||||||
|
|
||||||
const search : lib_plankton.zoo_search.type_search<type_item> = lib_plankton.zoo_search.make<type_item>(
|
const search : lib_plankton.zoo_search.type_search<type_item> = lib_plankton.zoo_search.make<type_item>(
|
||||||
(term) => _espe.backend.member_list(term),
|
(term) => _espe.backend.member_list(term),
|
||||||
{
|
{
|
||||||
|
@ -57,7 +62,7 @@ lib_plankton.zoo_page.register(
|
||||||
);
|
);
|
||||||
lib_plankton.zoo_search.render(
|
lib_plankton.zoo_search.render(
|
||||||
search,
|
search,
|
||||||
target_element,
|
target_element.querySelector(".list-search"),
|
||||||
{
|
{
|
||||||
"state": {
|
"state": {
|
||||||
"term": term,
|
"term": term,
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
|
<template id="list">
|
||||||
|
<h2 class="list-title"></h2>
|
||||||
|
<div class="list-search"></div>
|
||||||
|
</template>
|
||||||
|
|
|
@ -2,6 +2,8 @@ lib_plankton.zoo_page.register(
|
||||||
"login",
|
"login",
|
||||||
(parameters, target_element) => {
|
(parameters, target_element) => {
|
||||||
target_element.appendChild(template_request("login"));
|
target_element.appendChild(template_request("login"));
|
||||||
|
|
||||||
|
target_element.querySelector(".login-title").textContent = lib_plankton.translate.get("page.login.title");
|
||||||
|
|
||||||
const form = new lib_plankton.zoo_form.class_form<
|
const form = new lib_plankton.zoo_form.class_form<
|
||||||
{
|
{
|
||||||
|
@ -20,18 +22,18 @@ lib_plankton.zoo_page.register(
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"input": new lib_plankton.zoo_input.class_input_text(),
|
"input": new lib_plankton.zoo_input.class_input_text(),
|
||||||
"label": "Name",
|
"label": lib_plankton.translate.get("page.login.name"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
"input": new lib_plankton.zoo_input.class_input_password(),
|
"input": new lib_plankton.zoo_input.class_input_password(),
|
||||||
"label": "Passwort",
|
"label": lib_plankton.translate.get("page.login.password"),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"label": "Anmelden",
|
"label": lib_plankton.translate.get("page.login.submit"),
|
||||||
"procedure": async (get_value, get_representation) => {
|
"procedure": async (get_value, get_representation) => {
|
||||||
const value = await get_value();
|
const value = await get_value();
|
||||||
(
|
(
|
||||||
|
@ -57,6 +59,6 @@ lib_plankton.zoo_page.register(
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
form.setup(target_element.querySelector(".login-form") as HTMLElement);
|
form.setup(target_element.querySelector(".login-form") as HTMLElement);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
<template id="login">
|
<template id="login">
|
||||||
<section class="login">
|
<h2 class="login-title"></h2>
|
||||||
<h2>Login</h2>
|
<div class="login-form"></div>
|
||||||
<div class="login-form">
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -43,11 +43,6 @@ lib_plankton.zoo_page.register(
|
||||||
representation => representation,
|
representation => representation,
|
||||||
new lib_plankton.zoo_input.class_input_group(
|
new lib_plankton.zoo_input.class_input_group(
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"name": "membership_number",
|
|
||||||
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.membership_number.label"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "name_real_value",
|
"name": "name_real_value",
|
||||||
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
||||||
|
@ -58,6 +53,11 @@ lib_plankton.zoo_page.register(
|
||||||
"input": new lib_plankton.zoo_input.class_input_number({"read_only": true}),
|
"input": new lib_plankton.zoo_input.class_input_number({"read_only": true}),
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.name_real_index.label"),
|
"label": lib_plankton.translate.get("page.view.form.field.name_real_index.label"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "membership_number",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
||||||
|
"label": lib_plankton.translate.get("page.view.form.field.membership_number.label"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "enabled",
|
"name": "enabled",
|
||||||
"input": new lib_plankton.zoo_input.class_input_checkbox(),
|
"input": new lib_plankton.zoo_input.class_input_checkbox(),
|
||||||
|
@ -68,6 +68,16 @@ lib_plankton.zoo_page.register(
|
||||||
"input": new lib_plankton.zoo_input.class_input_checkbox({"read_only": true}),
|
"input": new lib_plankton.zoo_input.class_input_checkbox({"read_only": true}),
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.registered.label"),
|
"label": lib_plankton.translate.get("page.view.form.field.registered.label"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "name_login",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
||||||
|
"label": lib_plankton.translate.get("page.view.form.field.name_login.label"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "password_set",
|
||||||
|
"input": new lib_plankton.zoo_input.class_input_checkbox({"read_only": true}),
|
||||||
|
"label": lib_plankton.translate.get("page.view.form.field.password_set.label"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "email_address_private",
|
"name": "email_address_private",
|
||||||
"input": new lib_plankton.zoo_input.class_input_text(),
|
"input": new lib_plankton.zoo_input.class_input_text(),
|
||||||
|
@ -93,16 +103,6 @@ lib_plankton.zoo_page.register(
|
||||||
"input": new lib_plankton.zoo_input.class_input_checkbox(),
|
"input": new lib_plankton.zoo_input.class_input_checkbox(),
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.email_allow_sending.label"),
|
"label": lib_plankton.translate.get("page.view.form.field.email_allow_sending.label"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "name_login",
|
|
||||||
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.name_login.label"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "password_set",
|
|
||||||
"input": new lib_plankton.zoo_input.class_input_checkbox({"read_only": true}),
|
|
||||||
"label": lib_plankton.translate.get("page.view.form.field.password_set.label"),
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
<hr/>
|
||||||
<main>
|
<main>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -63,7 +63,9 @@ input[type="password"]
|
||||||
|
|
||||||
border: 1px solid hsl(var(--hue), 0%, 50%);
|
border: 1px solid hsl(var(--hue), 0%, 50%);
|
||||||
|
|
||||||
min-width: 320px;
|
min-width: 300px;
|
||||||
|
|
||||||
|
font-size: 1.125em;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"]:not([disabled="disabled"])
|
input[type="text"]:not([disabled="disabled"])
|
||||||
|
@ -96,8 +98,10 @@ input[type="password"][disabled="disabled"]
|
||||||
|
|
||||||
nav
|
nav
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
border-bottom: 1px solid hsl(var(--hue), 0%, 100%);
|
border-bottom: 1px solid hsl(var(--hue), 0%, 100%);
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
nav > ul
|
nav > ul
|
||||||
|
@ -211,3 +215,8 @@ nav > ul > li:hover::after
|
||||||
{
|
{
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plankton_search_item
|
||||||
|
{
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue