mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fix quick add did not always work the second time
This commit is contained in:
parent
cb484c8f6c
commit
36f42f77db
@ -807,8 +807,10 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
return html``;
|
||||
}
|
||||
return html`
|
||||
<sl-option value=""
|
||||
.selected=${this.getValueAsArray().some(v => v == "")}
|
||||
<sl-option
|
||||
part="emptyLabel"
|
||||
value=""
|
||||
.selected=${this.getValueAsArray().some(v => v == "")}
|
||||
>
|
||||
${this.emptyLabel}
|
||||
</sl-option>`;
|
||||
|
@ -515,6 +515,8 @@ egw.extend('links', egw.MODULE_GLOBAL, function()
|
||||
const parent = document.getElementById(_parent);
|
||||
const select = document.createElement('et2-select');
|
||||
select.setAttribute('id', 'quick_add_selectbox');
|
||||
// Empty label is required to clear value, but we hide it
|
||||
select.emptyLabel = "Select";
|
||||
select.placement = "bottom end";
|
||||
parent.append(select);
|
||||
const plus = parent.querySelector("span");
|
||||
|
@ -5613,6 +5613,11 @@ div.timesheet_timer {
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #timer_selectbox sl-option {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(emptyLabel),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(emptyLabel) {
|
||||
/* do NOT show empty label, required for clearing value */
|
||||
display: none;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #timer_selectbox::part(form-control-input),
|
||||
|
@ -5593,6 +5593,11 @@ div.timesheet_timer {
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #timer_selectbox sl-option {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(emptyLabel),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(emptyLabel) {
|
||||
/* do NOT show empty label, required for clearing value */
|
||||
display: none;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #timer_selectbox::part(form-control-input),
|
||||
|
@ -5603,6 +5603,11 @@ div.timesheet_timer {
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #timer_selectbox sl-option {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(emptyLabel),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(emptyLabel) {
|
||||
/* do NOT show empty label, required for clearing value */
|
||||
display: none;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #timer_selectbox::part(form-control-input),
|
||||
|
@ -298,6 +298,11 @@ div.timesheet_timer {
|
||||
}
|
||||
}
|
||||
|
||||
#quick_add_selectbox::part(emptyLabel) {
|
||||
/* do NOT show empty label, required for clearing value */
|
||||
display: none;
|
||||
}
|
||||
|
||||
#quick_add_selectbox::part(form-control-input), #timer_selectbox::part(form-control-input) {
|
||||
border: none !important;
|
||||
}
|
||||
|
@ -5624,6 +5624,11 @@ div.timesheet_timer {
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #timer_selectbox sl-option {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(emptyLabel),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(emptyLabel) {
|
||||
/* do NOT show empty label, required for clearing value */
|
||||
display: none;
|
||||
}
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_timer #quick_add_selectbox::part(form-control-input),
|
||||
#egw_fw_topmenu_info_items #topmenu_info_quick_add #timer_selectbox::part(form-control-input),
|
||||
|
Loading…
Reference in New Issue
Block a user