[mod] view
This commit is contained in:
parent
172f3f2c1f
commit
e8432a3c48
7 changed files with 65 additions and 18 deletions
21
lib/plankton/plankton.d.ts
vendored
21
lib/plankton/plankton.d.ts
vendored
|
@ -1,15 +1,15 @@
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type int = number;
|
type int = number;
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type float = number;
|
type float = number;
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type type_date = {
|
type type_date = {
|
||||||
year: int;
|
year: int;
|
||||||
month: int;
|
month: int;
|
||||||
day: int;
|
day: int;
|
||||||
|
@ -17,7 +17,7 @@ declare type type_date = {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type type_time = {
|
type type_time = {
|
||||||
hour: int;
|
hour: int;
|
||||||
minute: int;
|
minute: int;
|
||||||
second: int;
|
second: int;
|
||||||
|
@ -25,7 +25,7 @@ declare type type_time = {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type type_datetimeobject = {
|
type type_datetimeobject = {
|
||||||
date: type_date;
|
date: type_date;
|
||||||
time: type_time;
|
time: type_time;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ declare namespace lib_plankton.base {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
declare type type_pseudopointer<type_value> = {
|
type type_pseudopointer<type_value> = {
|
||||||
value: type_value;
|
value: type_value;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
@ -1513,7 +1513,7 @@ declare namespace lib_plankton.storage.memory {
|
||||||
clear(): Promise<void>;
|
clear(): Promise<void>;
|
||||||
write(key: any, value: any): Promise<boolean>;
|
write(key: any, value: any): Promise<boolean>;
|
||||||
delete(key: any): Promise<void>;
|
delete(key: any): Promise<void>;
|
||||||
read(key: any): Promise<type_item>;
|
read(key: any): Promise<Awaited<type_item>>;
|
||||||
search(term: any): Promise<{
|
search(term: any): Promise<{
|
||||||
key: string;
|
key: string;
|
||||||
preview: string;
|
preview: string;
|
||||||
|
@ -1815,12 +1815,17 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_checkbox implements interface_input<boolean> {
|
class class_input_checkbox implements interface_input<boolean> {
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private read_only;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private dom_input;
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor();
|
constructor(options?: {
|
||||||
|
read_only?: boolean;
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4613,7 +4613,11 @@ var lib_plankton;
|
||||||
class class_input_checkbox {
|
class class_input_checkbox {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor(options = {}) {
|
||||||
|
options = Object.assign({
|
||||||
|
"read_only": false,
|
||||||
|
}, options);
|
||||||
|
this.read_only = options.read_only;
|
||||||
this.dom_input = null;
|
this.dom_input = null;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -4622,6 +4626,14 @@ var lib_plankton;
|
||||||
setup(parent) {
|
setup(parent) {
|
||||||
this.dom_input = document.createElement("input");
|
this.dom_input = document.createElement("input");
|
||||||
this.dom_input.setAttribute("type", "checkbox");
|
this.dom_input.setAttribute("type", "checkbox");
|
||||||
|
{
|
||||||
|
if (this.read_only) {
|
||||||
|
this.dom_input.setAttribute("disabled", "disabled");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
// this.dom_input.style.display = "initial"; // n3o!!!
|
// this.dom_input.style.display = "initial"; // n3o!!!
|
||||||
parent.appendChild(this.dom_input);
|
parent.appendChild(this.dom_input);
|
||||||
return Promise.resolve(undefined);
|
return Promise.resolve(undefined);
|
||||||
|
|
|
@ -10,6 +10,9 @@ namespace _espe.conf
|
||||||
port : int;
|
port : int;
|
||||||
path_base : string;
|
path_base : string;
|
||||||
};
|
};
|
||||||
|
settings : {
|
||||||
|
title : string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,8 @@ async function main(
|
||||||
"fallback": {"name": "index", "parameters": {}},
|
"fallback": {"name": "index", "parameters": {}},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// set title
|
||||||
|
document.querySelector("header > h1").textContent = _espe.conf.get().settings.title;
|
||||||
setup_nav();
|
setup_nav();
|
||||||
lib_plankton.zoo_page.start();
|
lib_plankton.zoo_page.start();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,27 +15,27 @@ lib_plankton.zoo_page.register(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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(),
|
||||||
"label": "Echter Name",
|
"label": "Echter Name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "email_address_private_value",
|
"name": "email_address_private_value",
|
||||||
"input": new lib_plankton.zoo_input.class_input_text({"read_only": true}),
|
"input": new lib_plankton.zoo_input.class_input_text(),
|
||||||
"label": "Private E-Mail-Adresse",
|
"label": "Private E-Mail-Adresse",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "email_address_numberbased_use",
|
"name": "email_address_numberbased_use",
|
||||||
"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": "Nummernbasierte E-Mail-Adresse verwenden",
|
"label": "Nummernbasierte E-Mail-Adresse verwenden",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "email_address_namebased_use",
|
"name": "email_address_namebased_use",
|
||||||
"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": "Namensbasierte E-Mail-Adresse verwenden",
|
"label": "Namensbasierte E-Mail-Adresse verwenden",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "email_redirect",
|
"name": "email_redirect",
|
||||||
"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": "eingehende E-Mails zu privater Adresse umleiten",
|
"label": "eingehende E-Mails zu privater Adresse umleiten",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>DIE LINKE. Landesverband Sachsen</h1>
|
<h1>Espe</h1>
|
||||||
</header>
|
</header>
|
||||||
<hr/>
|
<hr/>
|
||||||
<nav>
|
<nav>
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
|
|
||||||
html
|
html
|
||||||
{
|
{
|
||||||
font-family: monospace;
|
font-family: sans-serif;
|
||||||
|
/*
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
*/
|
||||||
|
|
||||||
background-color: hsl(var(--hue), 0%, 0%);
|
background-color: hsl(var(--hue), 0%, 0%);
|
||||||
color: hsl(var(--hue), 0%, 100%);
|
color: hsl(var(--hue), 0%, 100%);
|
||||||
|
@ -55,10 +57,33 @@ input[type="number"]
|
||||||
,
|
,
|
||||||
input[type="password"]
|
input[type="password"]
|
||||||
{
|
{
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
|
border: 1px solid hsl(var(--hue), 0%, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]:not([disabled="disabled"])
|
||||||
|
,
|
||||||
|
input[type="number"]:not([disabled="disabled"])
|
||||||
|
,
|
||||||
|
input[type="password"]:not([disabled="disabled"])
|
||||||
|
{
|
||||||
|
/*
|
||||||
background-color: hsl(var(--hue), 0%, 87.5%);
|
background-color: hsl(var(--hue), 0%, 87.5%);
|
||||||
color: hsl(var(--hue), 0%, 12.5%);
|
color: hsl(var(--hue), 0%, 12.5%);
|
||||||
|
*/
|
||||||
padding: 8px;
|
background-color: hsl(var(--hue), 0%, 6.125%);
|
||||||
|
color: hsl(var(--hue), 0%, 87.5%);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"][disabled="disabled"]
|
||||||
|
,
|
||||||
|
input[type="number"][disabled="disabled"]
|
||||||
|
,
|
||||||
|
input[type="password"][disabled="disabled"]
|
||||||
|
{
|
||||||
|
background-color: hsl(var(--hue), 0%, 12.5%);
|
||||||
|
color: hsl(var(--hue), 0%, 87.5%);
|
||||||
}
|
}
|
||||||
|
|
||||||
nav
|
nav
|
||||||
|
|
Loading…
Add table
Reference in a new issue