Calendar: Fix extra blank participant, fix email showed up in sidebox owner options

This commit is contained in:
nathan 2023-09-19 11:59:48 -06:00
parent dc9736260a
commit 70f379d985
5 changed files with 14 additions and 57 deletions

View File

@ -56,19 +56,16 @@ export class CalendarOwner extends Et2StaticSelectMixin(Et2Select)
*/
_optionTemplate(option : SelectOption) : TemplateResult
{
const checked = this.value == null ?
option.value === this.value || this.multiple && this.value.indexOf(option.value) >= 0 :
this.value.indexOf(option.value) >= 0;
// Tag used must match this.optionTag, but you can't use the variable directly.
// Pass option along so SearchMixin can grab it if needed
const value = (<string>option.value).replaceAll(" ", "___");
return html`
<sl-option value="${option.value}"
<sl-option
part="option"
exportparts="prefix:tag__prefix, suffix:tag__suffix"
value="${option.value}"
title="${!option.title || this.noLang ? option.title : this.egw().lang(option.title)}"
class="${option.class}" .option=${option}
?disabled=${option.disabled}
.selected=${checked}
.selected=${this.getValueAsArray().some(v => v == value)}
>
${this._iconTemplate(option)}
${this.noLang ? option.label : this.egw().lang(option.label)}

View File

@ -99,7 +99,7 @@
box-shadow: none;
}
/* Hide email in sidebox */
#calendar-sidebox_owner .title {
#calendar-sidebox_owner::part(tag__suffix) {
display: none;
}

View File

@ -48,7 +48,7 @@
<rows>
<row disabled="@no_add" height="60" class="et2_toolbar">
<calendar-owner id="participant" allowFreeEntries="true" span="4"
empty_label="Add new participants or resource"
placeholder="Add new participants or resource"
onchange="app.calendar.participantOnChange"/>
<et2-hbox width="100%">
<et2-textbox type="integer" id="quantity" min="1" statustext="Number of resources to be booked"></et2-textbox>

View File

@ -115,7 +115,7 @@
box-shadow: none;
}
/* Hide email in sidebox */
#calendar-sidebox_owner .title {
#calendar-sidebox_owner sl-option::part(suffix) {
display: none;
}
/* Conflict display */
@ -2359,52 +2359,12 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
background: #f2f2f2;
}
.calendar_calDayTodos .calendar_calDayTodosTable table td {
display: inline-block;
padding: 3px;
}
.calendar_calDayTodos .calendar_calDayTodosTable table td img[src$="svg"] {
background-color: #0c5da5;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzc0MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMCUiIHkyPSIxMDAlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEM1REE1IiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjMEM1REE1IiBvZmZzZXQ9IjEiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZzc0MykiLz48L3N2Zz4=);
background-image: -moz-linear-gradient(top, #0C5DA5, #0C5DA5);
background-image: -ms-linear-gradient(top, #0C5DA5, #0C5DA5);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0C5DA5), to(#0C5DA5));
background-image: -webkit-linear-gradient(top, #0C5DA5, #0C5DA5);
background-image: -o-linear-gradient(top, #0C5DA5, #0C5DA5);
background-image: linear-gradient(top, #0C5DA5, #0C5DA5);
background-repeat: repeat-x;
}
.calendar_calDayTodos .calendar_calDayTodosTable table td img {
width: 12px;
height: 12px;
/*.background_color_10_gray;*/
-webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.calendar_calDayTodos .calendar_calDayTodosTable table td img:hover {
/*.background_color_20_gray;*/
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
border: 1px solid rgba(0, 0, 0, 0.5);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.calendar_calDayTodos .calendar_calDayTodosTable table td img:active {
/*.background_color_30_gray;*/
border: 1px solid rgba(0, 0, 0, 0.9);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
background-color: #b3e4a6;
background-color: #ace29e !important;
}
.calendar_calDayTodosHeader {
text-align: center;

View File

@ -103,7 +103,7 @@
box-shadow: none;
}
/* Hide email in sidebox */
#calendar-sidebox_owner .title {
#calendar-sidebox_owner sl-option::part(suffix) {
display: none;
}
/* Conflict display */