Mobil-Ansicht #4
|
|
@ -100,7 +100,7 @@ namespace _dali.widgets
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const dom_input : HTMLInputElement = (dom_dummy.querySelector(".widget-special_number_input-input > input") as HTMLInputElement);
|
const dom_input : HTMLInputElement = (dom_dummy.querySelector(".widget-special_number_input-input") as HTMLInputElement);
|
||||||
|
|
||||||
// listeners
|
// listeners
|
||||||
{
|
{
|
||||||
|
|
|
||||||
34
source/widgets/special_number_input/style.css
Normal file
34
source/widgets/special_number_input/style.css
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
.widget-special_number_input-controls
|
||||||
|
{
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-special_number_input-controls > *
|
||||||
|
{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-special_number_input-button
|
||||||
|
{
|
||||||
|
padding: 4px 4px;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-special_number_input-label
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
font-size: 0.75em;
|
||||||
|
/*
|
||||||
|
text-transform: uppercase;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-special_number_input-input
|
||||||
|
{
|
||||||
|
max-width: 40px;
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="widget-special_number_input">
|
<div class="widget-special_number_input">
|
||||||
<label class="widget-special_number_input-label">{{label}}</label>
|
<label class="widget-special_number_input-label">{{label}}</label>
|
||||||
<div class="widget-special_number_input-input">
|
<div class="widget-special_number_input-controls">
|
||||||
<button class="widget-special_number_input-prev">◂</button>
|
<div class="widget-special_number_input-button widget-special_number_input-prev">◂</div>
|
||||||
<input type="text" pattern="-?[0-9]+"/>
|
<input type="text" class="widget-special_number_input-input" pattern="-?[0-9]+"/>
|
||||||
<button class="widget-special_number_input-next">▸</button>
|
<div class="widget-special_number_input-button widget-special_number_input-next">▸</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,8 @@ namespace _dali.widgets.weekview
|
||||||
*/
|
*/
|
||||||
private static entry_hash(
|
private static entry_hash(
|
||||||
entry : _dali.type_event_object_extended
|
entry : _dali.type_event_object_extended
|
||||||
) : string
|
)
|
||||||
|
: string
|
||||||
{
|
{
|
||||||
return lib_plankton.call.convey(
|
return lib_plankton.call.convey(
|
||||||
{
|
{
|
||||||
|
|
@ -214,7 +215,8 @@ namespace _dali.widgets.weekview
|
||||||
private static event_generate_tooltip(
|
private static event_generate_tooltip(
|
||||||
calendar_name : string,
|
calendar_name : string,
|
||||||
event_object : _dali.type_event_object
|
event_object : _dali.type_event_object
|
||||||
) : string
|
)
|
||||||
|
: string
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
lib_plankton.string.coin(
|
lib_plankton.string.coin(
|
||||||
|
|
@ -360,7 +362,8 @@ namespace _dali.widgets.weekview
|
||||||
*/
|
*/
|
||||||
private async entry_insert(
|
private async entry_insert(
|
||||||
entry : _dali.type_event_object_extended
|
entry : _dali.type_event_object_extended
|
||||||
) : Promise<(null | HTMLElement)>
|
)
|
||||||
|
: Promise<(null | HTMLElement)>
|
||||||
{
|
{
|
||||||
const selector : string = lib_plankton.string.coin(
|
const selector : string = lib_plankton.string.coin(
|
||||||
".weekview-cell[rel=\"{{rel}}\"] > .weekview-events",
|
".weekview-cell[rel=\"{{rel}}\"] > .weekview-events",
|
||||||
|
|
@ -423,7 +426,8 @@ namespace _dali.widgets.weekview
|
||||||
*/
|
*/
|
||||||
private async entry_add(
|
private async entry_add(
|
||||||
entry : _dali.type_event_object_extended
|
entry : _dali.type_event_object_extended
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
const dom_entry : (null | HTMLElement) = await this.entry_insert(entry);
|
const dom_entry : (null | HTMLElement) = await this.entry_insert(entry);
|
||||||
if (dom_entry === null)
|
if (dom_entry === null)
|
||||||
|
|
@ -448,7 +452,8 @@ namespace _dali.widgets.weekview
|
||||||
private async entry_update(
|
private async entry_update(
|
||||||
key : _dali.type_event_key,
|
key : _dali.type_event_key,
|
||||||
entry : _dali.type_event_object_extended
|
entry : _dali.type_event_object_extended
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
if (! this.event_map.has(key))
|
if (! this.event_map.has(key))
|
||||||
{
|
{
|
||||||
|
|
@ -504,7 +509,8 @@ namespace _dali.widgets.weekview
|
||||||
*/
|
*/
|
||||||
private async entry_remove(
|
private async entry_remove(
|
||||||
key : _dali.type_event_key
|
key : _dali.type_event_key
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
if (! this.event_map.has(key))
|
if (! this.event_map.has(key))
|
||||||
{
|
{
|
||||||
|
|
@ -533,7 +539,8 @@ namespace _dali.widgets.weekview
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public async update_entries(
|
public async update_entries(
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
const entries : Array<_dali.type_event_object_extended> = await this.get_entries_wrapped(
|
const entries : Array<_dali.type_event_object_extended> = await this.get_entries_wrapped(
|
||||||
);
|
);
|
||||||
|
|
@ -574,7 +581,8 @@ namespace _dali.widgets.weekview
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private async update_table(
|
private async update_table(
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @todo avoid?
|
* @todo avoid?
|
||||||
|
|
@ -834,7 +842,8 @@ namespace _dali.widgets.weekview
|
||||||
=
|
=
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
) : void
|
)
|
||||||
|
: void
|
||||||
{
|
{
|
||||||
this.container.querySelectorAll(".weekview-event_entry").forEach(
|
this.container.querySelectorAll(".weekview-event_entry").forEach(
|
||||||
(element) => {
|
(element) => {
|
||||||
|
|
@ -862,7 +871,8 @@ namespace _dali.widgets.weekview
|
||||||
*/
|
*/
|
||||||
public async load(
|
public async load(
|
||||||
target_element : Element
|
target_element : Element
|
||||||
) : Promise<void>
|
)
|
||||||
|
: Promise<void>
|
||||||
{
|
{
|
||||||
target_element.innerHTML = await _dali.helpers.template_coin(
|
target_element.innerHTML = await _dali.helpers.template_coin(
|
||||||
"widget-weekview",
|
"widget-weekview",
|
||||||
|
|
|
||||||
|
|
@ -10,29 +10,16 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.weekview-control
|
.weekview-controls > *
|
||||||
{
|
{
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
|
|
||||||
min-width: 80px;
|
margin: 0 0 0 16px;
|
||||||
margin: 0 0 0 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.weekview-controls .widget-special_number_input
|
|
||||||
{
|
|
||||||
flex-basis: 0;
|
|
||||||
flex-grow: 0;
|
|
||||||
flex-shrink: 1;
|
|
||||||
|
|
||||||
min-width: 140px;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.weekview-control-label
|
.weekview-control-label
|
||||||
,
|
|
||||||
.weekview-controls .widget-special_number_input-label
|
|
||||||
{
|
{
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
|
@ -42,16 +29,6 @@
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.weekview-control-input > *
|
|
||||||
{
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.weekview-controls .widget-special_number_input input
|
|
||||||
{
|
|
||||||
max-width: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.weekview-table table
|
.weekview-table table
|
||||||
{
|
{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue