Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e09cbb27a | ||
|
|
57ce184761 | ||
|
|
0c7dbbaa57 | ||
|
|
1c8d3d0725 | ||
|
|
7a5aeb3ff3 | ||
|
|
bb33ff66b3 |
74
lib/plankton/plankton.d.ts
vendored
74
lib/plankton/plankton.d.ts
vendored
|
|
@ -4306,9 +4306,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
/**
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4356,10 +4353,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4399,10 +4392,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4450,10 +4439,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4492,10 +4477,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4552,10 +4533,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4594,10 +4571,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4644,10 +4617,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4687,10 +4656,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4737,10 +4702,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4804,10 +4765,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
export {};
|
||||
}
|
||||
|
|
@ -4852,10 +4809,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4908,10 +4861,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -4956,10 +4905,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -5008,10 +4953,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -5047,10 +4988,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -5084,10 +5021,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -5121,10 +5054,6 @@ declare namespace lib_plankton.zoo_input {
|
|||
* [implementation]
|
||||
*/
|
||||
hook_change(action: (() => void)): Promise<void>;
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus(): void;
|
||||
}
|
||||
}
|
||||
declare namespace lib_plankton.zoo_input {
|
||||
|
|
@ -5237,9 +5166,6 @@ declare namespace lib_plankton.zoo_form {
|
|||
/**
|
||||
*/
|
||||
input_lock(mode: boolean): Promise<void>;
|
||||
/**
|
||||
*/
|
||||
input_focus(): void;
|
||||
}
|
||||
export {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13295,12 +13295,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_input.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_simple = class_input_simple;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13370,12 +13364,6 @@ var lib_plankton;
|
|||
hook_change(action) {
|
||||
return this.core.hook_change(action);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.core.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_wrapped = class_input_wrapped;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13498,12 +13486,6 @@ var lib_plankton;
|
|||
});
|
||||
await this.core.hook_change(action);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_set.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_soft = class_input_soft;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13575,11 +13557,6 @@ var lib_plankton;
|
|||
hook_change(action) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_hidden = class_input_hidden;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13734,12 +13711,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_textarea.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_textarea = class_input_textarea;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13851,12 +13822,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_input.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_date = class_input_date;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -13976,12 +13941,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_input.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_checkbox = class_input_checkbox;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14066,12 +14025,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_select.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_selection = class_input_selection;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14184,12 +14137,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_inputs[0].focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_enumeration = class_input_enumeration;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14369,12 +14316,6 @@ var lib_plankton;
|
|||
await element.input.hook_change(action);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
lib_plankton.log.notice("plankton.zoo_input.list.focus.dummy_implementation");
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_list = class_input_list;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14486,12 +14427,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.checkboxes[0].focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_set = class_input_set;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14610,12 +14545,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_input.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_password = class_input_password;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14709,12 +14638,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.dom_element.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_switch = class_input_switch;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14897,12 +14820,6 @@ var lib_plankton;
|
|||
});
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.fields[0].input.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_group = class_input_group;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -14983,12 +14900,6 @@ var lib_plankton;
|
|||
hook_change(action) {
|
||||
return this.core.hook_change(action);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.core.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_hashmap = class_input_hashmap;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -15076,12 +14987,6 @@ var lib_plankton;
|
|||
hook_change(action) {
|
||||
return this.core.hook_change(action);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.core.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_datetime = class_input_datetime;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -15192,12 +15097,6 @@ var lib_plankton;
|
|||
hook_change(action) {
|
||||
return this.core.hook_change(action);
|
||||
}
|
||||
/**
|
||||
* [implementation]
|
||||
*/
|
||||
focus() {
|
||||
this.core.focus();
|
||||
}
|
||||
}
|
||||
zoo_input.class_input_datetime_central_europe = class_input_datetime_central_europe;
|
||||
})(zoo_input = lib_plankton.zoo_input || (lib_plankton.zoo_input = {}));
|
||||
|
|
@ -15545,11 +15444,6 @@ var lib_plankton;
|
|||
input_lock(mode) {
|
||||
return this.input.lock(mode);
|
||||
}
|
||||
/**
|
||||
*/
|
||||
input_focus() {
|
||||
return this.input.focus();
|
||||
}
|
||||
}
|
||||
zoo_form.class_form = class_form;
|
||||
})(zoo_form = lib_plankton.zoo_form || (lib_plankton.zoo_form = {}));
|
||||
|
|
|
|||
|
|
@ -138,25 +138,6 @@ namespace _dali.helpers
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
export async function element_from_template(
|
||||
group : string,
|
||||
name : string,
|
||||
data : Record<string, string>
|
||||
)
|
||||
: Promise<HTMLElement>
|
||||
{
|
||||
const dom_dummy = document.createElement("div");
|
||||
dom_dummy.innerHTML = await _dali.helpers.template_coin(
|
||||
group,
|
||||
name,
|
||||
data
|
||||
);
|
||||
return (dom_dummy.children[0] as HTMLElement);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @todo outsource
|
||||
*/
|
||||
|
|
@ -164,8 +145,7 @@ namespace _dali.helpers
|
|||
members : Array<
|
||||
() => Promise<type_result>
|
||||
>
|
||||
)
|
||||
: Promise<
|
||||
) : Promise<
|
||||
Array<
|
||||
type_result
|
||||
>
|
||||
|
|
@ -182,8 +162,7 @@ namespace _dali.helpers
|
|||
/**
|
||||
*/
|
||||
export function input_access_level(
|
||||
)
|
||||
: lib_plankton.zoo_input.interface_input<_dali.enum_access_level>
|
||||
) : lib_plankton.zoo_input.interface_input<_dali.enum_access_level>
|
||||
{
|
||||
return (
|
||||
new lib_plankton.zoo_input.class_input_wrapped<
|
||||
|
|
@ -304,8 +283,7 @@ namespace _dali.helpers
|
|||
/**
|
||||
*/
|
||||
export function datetime_input(
|
||||
)
|
||||
: lib_plankton.zoo_input.interface_input<lib_plankton.pit.type_datetime>
|
||||
) : lib_plankton.zoo_input.interface_input<lib_plankton.pit.type_datetime>
|
||||
{
|
||||
return (
|
||||
_dali.conf.get().misc.use_central_europe_specific_datetime_inputs
|
||||
|
|
@ -386,7 +364,7 @@ namespace _dali.helpers
|
|||
}
|
||||
else
|
||||
{
|
||||
_dali.overlay.get_content_element().innerHTML = ". . .";
|
||||
_dali.overlay.get_content_element().innerHTML = "[...]";
|
||||
_dali.overlay.toggle({"mode": true});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
source/style/hacks.css
Normal file
9
source/style/hacks.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.plankton_input_group_field[rel="resource"]
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.weekview-control-count
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
|
|
@ -20,6 +20,72 @@ header
|
|||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
#overlay
|
||||
{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: hsla(var(--hue), 0%, 0%, 0.75);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#overlay_content
|
||||
{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
|
||||
padding: 32px;
|
||||
|
||||
background-color: hsl(0, 0%, 12.5%);
|
||||
color: hsl(0, 0%, 100%);
|
||||
}
|
||||
|
||||
#overlay:not(.overlay_active)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
nav > ul
|
||||
{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nav > ul > li
|
||||
{
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
nav > ul > li:not(.active)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
nav a
|
||||
{
|
||||
padding: 8px;
|
||||
text-decoration: none;
|
||||
color: hsl(var(--hue), 0%, 87.5%);
|
||||
}
|
||||
|
||||
nav a:hover
|
||||
{
|
||||
color: hsl(var(--hue), 0%, 100%);
|
||||
border-bottom: 2px solid hsl(0, 0%, 100%);
|
||||
transition: 1s ease color;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
text-decoration: none;
|
||||
|
|
@ -35,7 +101,7 @@ a:hover
|
|||
|
||||
button
|
||||
{
|
||||
padding: 8px 12px;
|
||||
padding: 4px 8px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
#overlay
|
||||
{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: hsla(var(--hue), 0%, 0%, 0.75);
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#overlay_content
|
||||
{
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
|
||||
padding: 32px;
|
||||
|
||||
background-color: hsl(0, 0%, 12.5%);
|
||||
color: hsl(0, 0%, 100%);
|
||||
}
|
||||
|
||||
#overlay:not(.overlay_active)
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -159,10 +159,6 @@ namespace _dali.widgets
|
|||
);
|
||||
}
|
||||
}
|
||||
// init
|
||||
{
|
||||
(target_element.querySelector(".widget-caldav-close") as HTMLElement).focus();
|
||||
}
|
||||
|
||||
return Promise.resolve<void>(undefined);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,13 +111,6 @@ namespace _dali.widgets
|
|||
target_element : HTMLElement
|
||||
) : Promise<void>
|
||||
{
|
||||
const dom_root = await _dali.helpers.element_from_template(
|
||||
"widget-calendar_edit",
|
||||
"main",
|
||||
{
|
||||
}
|
||||
);
|
||||
|
||||
const form : lib_plankton.zoo_form.class_form<
|
||||
_dali.type_calendar_object,
|
||||
_dali.type_calendar_object
|
||||
|
|
@ -250,12 +243,9 @@ namespace _dali.widgets
|
|||
)
|
||||
)
|
||||
);
|
||||
await form.setup(dom_root);
|
||||
await form.setup(target_element);
|
||||
await form.input_lock(this.read_only);
|
||||
await form.input_write(this.initial_value);
|
||||
|
||||
target_element.appendChild(dom_root);
|
||||
form.input_focus();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
.widget-calendar_edit .plankton_input_group_field[rel="resource"]
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<div class="widget-calendar_edit">
|
||||
</div>
|
||||
|
|
@ -154,13 +154,6 @@ namespace _dali.widgets
|
|||
target_element : HTMLElement
|
||||
) : Promise<void>
|
||||
{
|
||||
const dom_root = await _dali.helpers.element_from_template(
|
||||
"widget-event_edit",
|
||||
"main",
|
||||
{
|
||||
}
|
||||
);
|
||||
|
||||
const form : lib_plankton.zoo_form.class_form<
|
||||
type_value,
|
||||
type_representation
|
||||
|
|
@ -323,12 +316,9 @@ namespace _dali.widgets
|
|||
)
|
||||
)
|
||||
);
|
||||
await form.setup(dom_root);
|
||||
await form.setup(target_element);
|
||||
await form.input_lock(this.read_only);
|
||||
await form.input_write(this.initial_value);
|
||||
|
||||
target_element.appendChild(dom_root);
|
||||
form.input_focus();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
<div class="widget-event_edit">
|
||||
</div>
|
||||
|
|
@ -157,7 +157,6 @@ namespace _dali.widgets
|
|||
"password": "",
|
||||
}
|
||||
);
|
||||
form.input_focus();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,12 @@ namespace _dali.widgets
|
|||
|
||||
/**
|
||||
*/
|
||||
private entries : Array<type_entry_data>;
|
||||
private entries : Array<
|
||||
{
|
||||
data : type_entry_data;
|
||||
element : (null | HTMLElement);
|
||||
}
|
||||
>;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -58,7 +63,7 @@ namespace _dali.widgets
|
|||
/**
|
||||
*/
|
||||
public constructor(
|
||||
entries : Array<type_entry_data>,
|
||||
entry_data_list : Array<type_entry_data>,
|
||||
{
|
||||
"initial_groups": initial_groups = [],
|
||||
"initial_label": initial_label = "",
|
||||
|
|
@ -73,7 +78,14 @@ namespace _dali.widgets
|
|||
}
|
||||
)
|
||||
{
|
||||
this.entries = entries;
|
||||
this.entries = entry_data_list.map(
|
||||
entry_data => (
|
||||
{
|
||||
"data": entry_data,
|
||||
"element": null,
|
||||
}
|
||||
)
|
||||
);
|
||||
this.initial_groups = initial_groups;
|
||||
this.label = initial_label;
|
||||
this.container = null;
|
||||
|
|
@ -88,20 +100,17 @@ namespace _dali.widgets
|
|||
: void
|
||||
{
|
||||
this.entries.forEach(
|
||||
(entry, index) => {
|
||||
const active : boolean = groups.some(group => entry.groups.includes(group));
|
||||
const rel : string = index.toFixed(0);
|
||||
const dom_entry = this.container.querySelector(".widget-menu-entry[rel=\"" + rel + "\"]");
|
||||
dom_entry.classList.toggle("widget-menu-entry-hidden", (! active));
|
||||
entry => {
|
||||
const active : boolean = groups.some(group => entry.data.groups.includes(group));
|
||||
entry.element.classList.toggle("widget-menu-entry-hidden", (! active));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
public set_label(
|
||||
label : (null | string)
|
||||
label ?: string
|
||||
)
|
||||
: void
|
||||
{
|
||||
|
|
@ -144,69 +153,56 @@ namespace _dali.widgets
|
|||
)
|
||||
: Promise<void>
|
||||
{
|
||||
// structure
|
||||
this.container = await _dali.helpers.element_from_template(
|
||||
"widget-menu",
|
||||
"main",
|
||||
// container
|
||||
{
|
||||
"entries": (
|
||||
(
|
||||
await lib_plankton.call.promise_condense(
|
||||
this.entries.map(
|
||||
(entry, index) => () => _dali.helpers.template_coin(
|
||||
"widget-menu",
|
||||
"entry",
|
||||
const dom_container : HTMLElement = document.createElement("div");
|
||||
dom_container.classList.add("widget-menu");
|
||||
// button
|
||||
{
|
||||
"label": entry.label,
|
||||
"rel": index.toFixed(0),
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.join("")
|
||||
),
|
||||
}
|
||||
);
|
||||
|
||||
// logic
|
||||
{
|
||||
// collapser
|
||||
{
|
||||
this.container.querySelector(".widget-menu-button").addEventListener(
|
||||
const dom_button : HTMLElement = document.createElement("button");
|
||||
dom_button.textContent = "[" + this.label + "]";
|
||||
dom_button.classList.add("widget-menu-button");
|
||||
dom_button.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
this.toggle_collapsed();
|
||||
}
|
||||
);
|
||||
dom_container.classList.toggle("widget-menu-collapsed", true);
|
||||
dom_container.appendChild(dom_button);
|
||||
}
|
||||
// entries
|
||||
// platform
|
||||
{
|
||||
this.container.querySelectorAll(".widget-menu-entry").forEach(
|
||||
dom_entry => {
|
||||
const dom_platform : HTMLElement = document.createElement("div");
|
||||
dom_platform.classList.add("widget-menu-platform");
|
||||
{
|
||||
const dom_list : HTMLElement = document.createElement("ul");
|
||||
dom_list.classList.add("widget-menu-entries");
|
||||
this.entries.forEach(
|
||||
entry => {
|
||||
const dom_entry : HTMLElement = document.createElement("li");
|
||||
dom_entry.classList.add("widget-menu-entry");
|
||||
dom_entry.textContent = entry.data.label;
|
||||
dom_entry.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
const index : int = parseInt(dom_entry.getAttribute("rel"));
|
||||
const entry : type_entry_data = this.entries[index];
|
||||
this.toggle_collapsed({"mode": true});
|
||||
entry.action();
|
||||
entry.data.action();
|
||||
}
|
||||
);
|
||||
dom_list.appendChild(dom_entry);
|
||||
entry.element = dom_entry;
|
||||
}
|
||||
);
|
||||
dom_platform.appendChild(dom_list);
|
||||
}
|
||||
dom_container.appendChild(dom_platform);
|
||||
}
|
||||
target_element.appendChild(dom_container);
|
||||
this.container = dom_container;
|
||||
}
|
||||
|
||||
// init
|
||||
{
|
||||
this.toggle_collapsed({"mode": true});
|
||||
this.set_groups(this.initial_groups);
|
||||
this.set_label(null);
|
||||
}
|
||||
|
||||
// finish
|
||||
target_element.appendChild(this.container);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@
|
|||
|
||||
padding: 8px;
|
||||
|
||||
/*
|
||||
min-width: 200px;
|
||||
*/
|
||||
}
|
||||
|
||||
.widget-menu-platform:not(.widget-menu-platform-collapsed)
|
||||
|
|
@ -55,20 +53,31 @@
|
|||
text-transform: capitalize;
|
||||
background-color: hsl(var(--hue), 0%, 25%);
|
||||
color: hsl(var(--hue), 0%, 100%);
|
||||
}
|
||||
|
||||
.widget-menu-entry:not(:hover) > span
|
||||
{
|
||||
border-bottom: 2px solid hsl(0, 0%, 25%);
|
||||
}
|
||||
|
||||
.widget-menu-entry:hover > span
|
||||
.widget-menu-entry:hover
|
||||
{
|
||||
color: hsl(var(--hue), 0%, 100%);
|
||||
border-bottom: 2px solid hsl(0, 0%, 100%);
|
||||
|
||||
transition: 1s ease color;
|
||||
}
|
||||
|
||||
/*
|
||||
.widget-menu-entry
|
||||
{
|
||||
margin: 8px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.widget-menu-entry:not(:hover)
|
||||
{
|
||||
background-color: hsl(var(--hue), 0%, 25%);
|
||||
color: hsl(var(--hue), 0%, 100%);
|
||||
}
|
||||
*/
|
||||
|
||||
.widget-menu-entry.widget-menu-entry-hidden
|
||||
{
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
<li class="widget-menu-entry" rel="{{rel}}">
|
||||
<span>{{label}}</span>
|
||||
</li>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<div class="widget-menu">
|
||||
<button class="widget-menu-button"></button>
|
||||
<div class="widget-menu-platform">
|
||||
<ul class="widget-menu-entries">
|
||||
{{entries}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -78,8 +78,7 @@ namespace _dali.widgets
|
|||
*/
|
||||
public async load(
|
||||
target_element : Element
|
||||
)
|
||||
: Promise<void>
|
||||
) : Promise<void>
|
||||
{
|
||||
target_element.innerHTML = await _dali.helpers.template_coin(
|
||||
"widget-mode_switcher",
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ namespace _dali.widgets
|
|||
)
|
||||
: Promise<void>
|
||||
{
|
||||
const dom_root = await _dali.helpers.element_from_template(
|
||||
const dom_dummy = document.createElement("div");
|
||||
dom_dummy.innerHTML = await _dali.helpers.template_coin(
|
||||
"widget-special_number_input",
|
||||
"main",
|
||||
{
|
||||
|
|
@ -99,21 +100,20 @@ namespace _dali.widgets
|
|||
}
|
||||
);
|
||||
|
||||
const dom_input : HTMLInputElement = (dom_root.querySelector(".widget-special_number_input-input") as HTMLInputElement);
|
||||
const dom_input : HTMLInputElement = (dom_dummy.querySelector(".widget-special_number_input-input") as HTMLInputElement);
|
||||
|
||||
// listeners
|
||||
{
|
||||
dom_input.addEventListener(
|
||||
"change",
|
||||
() => {
|
||||
const value : int = parseInt(dom_input.value);
|
||||
this.value = parseInt(dom_input.value);
|
||||
if (
|
||||
((this.minimum === null) || (value >= this.minimum))
|
||||
((this.minimum === null) || (this.value >= this.minimum))
|
||||
&&
|
||||
((this.maximum === null) || (value <= this.maximum))
|
||||
((this.maximum === null) || (this.value <= this.maximum))
|
||||
)
|
||||
{
|
||||
this.value = value;
|
||||
this.action_change(this.value);
|
||||
}
|
||||
else
|
||||
|
|
@ -122,7 +122,7 @@ namespace _dali.widgets
|
|||
}
|
||||
}
|
||||
);
|
||||
dom_root.querySelector(".widget-special_number_input-prev").addEventListener(
|
||||
dom_dummy.querySelector(".widget-special_number_input-prev").addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
if ((this.minimum === null) || (this.value > this.minimum))
|
||||
|
|
@ -137,7 +137,7 @@ namespace _dali.widgets
|
|||
}
|
||||
}
|
||||
);
|
||||
dom_root.querySelector(".widget-special_number_input-next").addEventListener(
|
||||
dom_dummy.querySelector(".widget-special_number_input-next").addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
if ((this.maximum === null) || (this.value < this.maximum))
|
||||
|
|
@ -154,12 +154,9 @@ namespace _dali.widgets
|
|||
);
|
||||
}
|
||||
|
||||
// content
|
||||
{
|
||||
dom_input.value = this.value.toFixed(0);
|
||||
}
|
||||
|
||||
target_element.appendChild(dom_root);
|
||||
target_element.appendChild(dom_dummy.querySelector(".widget-special_number_input"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -384,7 +384,8 @@ namespace _dali.widgets
|
|||
}
|
||||
else
|
||||
{
|
||||
const dom_entry = await _dali.helpers.element_from_template(
|
||||
let dom_dummy : HTMLElement = document.createElement("div");
|
||||
dom_dummy.innerHTML = await _dali.helpers.template_coin(
|
||||
"widget-weekview",
|
||||
"tableview-cell-entry",
|
||||
{
|
||||
|
|
@ -399,6 +400,7 @@ namespace _dali.widgets
|
|||
),
|
||||
}
|
||||
);
|
||||
const dom_entry : HTMLElement = dom_dummy.querySelector(".weekview-event_entry");
|
||||
|
||||
// listener
|
||||
dom_entry.addEventListener(
|
||||
|
|
@ -936,14 +938,15 @@ namespace _dali.widgets
|
|||
*/
|
||||
// control:vertical
|
||||
{
|
||||
const dom_control = await _dali.helpers.element_from_template(
|
||||
const dom_dummy : HTMLElement = document.createElement("div");
|
||||
dom_dummy.innerHTML = await _dali.helpers.template_coin(
|
||||
"widget-weekview",
|
||||
"control-vertical",
|
||||
{
|
||||
"label": lib_plankton.translate.get("widget.weekview.controls.vertical"),
|
||||
}
|
||||
);
|
||||
const dom_input : HTMLInputElement = (dom_control.querySelector("input") as HTMLInputElement);
|
||||
const dom_input : HTMLInputElement = (dom_dummy.querySelector("input") as HTMLInputElement);
|
||||
dom_input.addEventListener(
|
||||
"change",
|
||||
async () => {
|
||||
|
|
@ -955,7 +958,7 @@ namespace _dali.widgets
|
|||
}
|
||||
);
|
||||
dom_input.checked = this.vertical;
|
||||
target_element.querySelector(".weekview-controls").appendChild(dom_control);
|
||||
target_element.querySelector(".weekview-controls").appendChild(dom_dummy.querySelector(".weekview-control-vertical"));
|
||||
}
|
||||
|
||||
this.container = target_element.querySelector(".weekview");
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@ ${dir_build}/index.html: \
|
|||
templates: \
|
||||
templates-widgets-special_number_input \
|
||||
templates-widgets-login_oidc \
|
||||
templates-widgets-menu \
|
||||
templates-widgets-sources \
|
||||
templates-widgets-calendar_edit \
|
||||
templates-widgets-event_edit \
|
||||
templates-widgets-caldav \
|
||||
templates-widgets-listview \
|
||||
templates-widgets-weekview \
|
||||
|
|
@ -56,13 +53,6 @@ templates-widgets-login_oidc: \
|
|||
@ ${cmd_mkdir} ${dir_build}/templates/widget-login_oidc
|
||||
@ ${cmd_cp} -r -u -v ${dir_source}/widgets/login_oidc/templates/* ${dir_build}/templates/widget-login_oidc/
|
||||
|
||||
.PHONY: templates-widgets-menu
|
||||
templates-widgets-menu: \
|
||||
$(wildcard ${dir_source}/widgets/menu/templates/*)
|
||||
@ ${cmd_log} "templates:widget:menu …"
|
||||
@ ${cmd_mkdir} ${dir_build}/templates/widget-menu
|
||||
@ ${cmd_cp} -r -u -v ${dir_source}/widgets/menu/templates/* ${dir_build}/templates/widget-menu/
|
||||
|
||||
.PHONY: templates-widgets-sources
|
||||
templates-widgets-sources: \
|
||||
$(wildcard ${dir_source}/widgets/sources/templates/*)
|
||||
|
|
@ -70,20 +60,6 @@ templates-widgets-sources: \
|
|||
@ ${cmd_mkdir} ${dir_build}/templates/widget-sources
|
||||
@ ${cmd_cp} -r -u -v ${dir_source}/widgets/sources/templates/* ${dir_build}/templates/widget-sources/
|
||||
|
||||
.PHONY: templates-widgets-calendar_edit
|
||||
templates-widgets-calendar_edit: \
|
||||
$(wildcard ${dir_source}/widgets/calendar_edit/templates/*)
|
||||
@ ${cmd_log} "templates:widget:calendar_edit …"
|
||||
@ ${cmd_mkdir} ${dir_build}/templates/widget-calendar_edit
|
||||
@ ${cmd_cp} -r -u -v ${dir_source}/widgets/calendar_edit/templates/* ${dir_build}/templates/widget-calendar_edit/
|
||||
|
||||
.PHONY: templates-widgets-event_edit
|
||||
templates-widgets-event_edit: \
|
||||
$(wildcard ${dir_source}/widgets/event_edit/templates/*)
|
||||
@ ${cmd_log} "templates:widget:event_edit …"
|
||||
@ ${cmd_mkdir} ${dir_build}/templates/widget-event_edit
|
||||
@ ${cmd_cp} -r -u -v ${dir_source}/widgets/event_edit/templates/* ${dir_build}/templates/widget-event_edit/
|
||||
|
||||
.PHONY: templates-widgets-caldav
|
||||
templates-widgets-caldav: \
|
||||
$(wildcard ${dir_source}/widgets/caldav/templates/*)
|
||||
|
|
|
|||
Loading…
Reference in a new issue