Merge dialog

- Add a hint that selecting from multiple directories isn't supported
- Add "Email" to mime selection
- Translations from Birgit
- Missing translations
This commit is contained in:
nathan 2024-05-24 15:22:51 -06:00
parent 08826c98d3
commit b2476816f1
5 changed files with 61 additions and 13 deletions

View File

@ -119,26 +119,26 @@ export class Et2MergeDialog extends Et2Widget(LitElement)
class=egw_app_merge_document" class=egw_app_merge_document"
path=${this.path} path=${this.path}
multiple="true" multiple="true"
buttonLabel="Download" buttonLabel=${this.egw().lang("Download")}
.title="${this.egw().lang("Insert in document")}" .title="${this.egw().lang("Insert in document")}"
.open=${true} .open=${true}
@et2-select=${this.handleFileSelect} @et2-select=${this.handleFileSelect}
> >
${this.canEmail ? ${this.canEmail ?
html` html`
<et2-button slot="footer" id="send" label="Merge &amp; send" image="mail" <et2-button slot="footer" id="send" label=${this.egw().lang("Merge & send")} image="mail"
noSubmit="true"></et2-button> ` : noSubmit="true"></et2-button> ` :
html` html`
<et2-button slot="footer" id="send" label="Merge" image="etemplate/merge" <et2-button slot="footer" id="send" label=${this.egw().lang("Merge")} image="etemplate/merge"
noSubmit="true"></et2-button>` noSubmit="true"></et2-button>`
} }
<et2-details> <et2-details>
<span slot="summary">${this.egw().lang("Merge options")}</span> <span slot="summary">${this.egw().lang("Merge options")}</span>
<et2-checkbox label="Save as PDF" id="pdf"></et2-checkbox> <et2-checkbox label=${this.egw().lang("Save as PDF")} id="pdf"></et2-checkbox>
<et2-checkbox id="link" <et2-checkbox id="link"
label="${this.egw().lang("Link to each %1", <string>this.egw().link_get_registry(this.application, "entry") || this.egw().lang("entry"))}" label="${this.egw().lang("Link to each entry")}"
></et2-checkbox> ></et2-checkbox>
<et2-checkbox label="Merge individually" id="individual"></et2-checkbox> <et2-checkbox label=${this.egw().lang("Merge individually")} id="individual"></et2-checkbox>
</et2-details> </et2-details>
</et2-vfs-select-dialog>`; </et2-vfs-select-dialog>`;
} }

View File

@ -8,7 +8,7 @@
*/ */
import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget"; import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
import {html, LitElement, nothing, PropertyValues, TemplateResult} from "lit"; import {html, LitElement, nothing, PropertyValues, render, TemplateResult} from "lit";
import shoelace from "../Styles/shoelace"; import shoelace from "../Styles/shoelace";
import styles from "./Et2VfsSelect.styles"; import styles from "./Et2VfsSelect.styles";
import {property} from "lit/decorators/property.js"; import {property} from "lit/decorators/property.js";
@ -110,7 +110,8 @@ export class Et2VfsSelectDialog
label: "Spreadsheets" label: "Spreadsheets"
}, },
{value: "image/", label: "Images"}, {value: "image/", label: "Images"},
{value: "video/", label: "Videos"} {value: "video/", label: "Videos"},
{value: "message/rfc822", label: "Email"}
]; ];
/** The select's help text. If you need to display HTML, use the `help-text` slot instead. */ /** The select's help text. If you need to display HTML, use the `help-text` slot instead. */
@ -249,11 +250,26 @@ export class Et2VfsSelectDialog
public setPath(path) public setPath(path)
{ {
const oldValue = this.path;
// Selection doesn't stay across sub-dirs. Notify user we dropped them.
if(this.value.length && path != oldValue)
{
const length = this.value.length;
this.value = [];
this.updateComplete.then(() =>
{
render(html`
<sl-alert duration="5000" closable open>
<sl-icon slot="icon" name="info-circle"></sl-icon>
${this.egw().lang("Selection of files can only be done in one folder. %1 files unselected.", length)}
</sl-alert>`, <HTMLElement><unknown>this);
});
}
if(path == '..') if(path == '..')
{ {
path = this.dirname(this.path); path = this.dirname(this.path);
} }
const oldValue = this.path;
this._pathNode.value = this.path = path; this._pathNode.value = this.path = path;
this.requestUpdate("path", oldValue); this.requestUpdate("path", oldValue);
this.currentResult = null; this.currentResult = null;
@ -745,7 +761,7 @@ export class Et2VfsSelectDialog
image="filemanager/fav_filter" noSubmit="true" image="filemanager/fav_filter" noSubmit="true"
@click=${() => this.setPath("/apps/favorites")} @click=${() => this.setPath("/apps/favorites")}
></et2-button> ></et2-button>
<et2-select id="app" emptyLabel="Applications" noLang="1" <et2-select id="app" emptyLabel="${this.egw().lang("Applications")}" noLang="1"
.select_options=${this._appList} .select_options=${this._appList}
@change=${(e) => this.setPath("/apps/" + e.target.value)} @change=${(e) => this.setPath("/apps/" + e.target.value)}
> >
@ -813,7 +829,7 @@ export class Et2VfsSelectDialog
const buttons = [ const buttons = [
{id: "ok", label: this.buttonLabel, image: image, button_id: Et2Dialog.OK_BUTTON}, {id: "ok", label: this.buttonLabel, image: image, button_id: Et2Dialog.OK_BUTTON},
{id: "cancel", label: "cancel", image: "cancel", button_id: Et2Dialog.CANCEL_BUTTON} {id: "cancel", label: this.egw().lang("cancel"), image: "cancel", button_id: Et2Dialog.CANCEL_BUTTON}
]; ];
return html` return html`
@ -882,6 +898,7 @@ export class Et2VfsSelectDialog
></et2-vfs-path> ></et2-vfs-path>
</div> </div>
${this.searchResultsTemplate()} ${this.searchResultsTemplate()}
<slot></slot>
<sl-visually-hidden> <sl-visually-hidden>
<et2-label for="mimeFilter">${this.egw().lang("mime filter")}</et2-label> <et2-label for="mimeFilter">${this.egw().lang("mime filter")}</et2-label>
</sl-visually-hidden> </sl-visually-hidden>
@ -901,7 +918,6 @@ export class Et2VfsSelectDialog
> >
${this.mimeOptionsTemplate()} ${this.mimeOptionsTemplate()}
</et2-select> </et2-select>
<slot></slot>
<div <div
part="form-control-help-text" part="form-control-help-text"
id="help-text" id="help-text"

View File

@ -6,6 +6,7 @@ import {state} from "lit/decorators/state.js";
import {classMap} from "lit/directives/class-map.js"; import {classMap} from "lit/directives/class-map.js";
import shoelace from "../Styles/shoelace"; import shoelace from "../Styles/shoelace";
import styles from "./Et2VfsSelectRow.styles"; import styles from "./Et2VfsSelectRow.styles";
import {SearchResultElement} from "../Et2Widget/SearchMixin";
/** /**
* @summary Shows one file in the Et2VfsSelectDialog list * @summary Shows one file in the Et2VfsSelectDialog list
@ -16,7 +17,7 @@ import styles from "./Et2VfsSelectRow.styles";
* @csspart base - The components base wrapper. * @csspart base - The components base wrapper.
* @csspart checked-icon - The checked icon, an <sl-icon> element. * @csspart checked-icon - The checked icon, an <sl-icon> element.
*/ */
export class Et2VfsSelectRow extends Et2Widget(LitElement) export class Et2VfsSelectRow extends Et2Widget(LitElement) implements SearchResultElement
{ {
static get styles() static get styles()
{ {
@ -43,6 +44,11 @@ export class Et2VfsSelectRow extends Et2Widget(LitElement)
this.setAttribute('aria-selected', 'false'); this.setAttribute('aria-selected', 'false');
} }
@property()
get label()
{
return this.value?.label || this.value?.name || "";
}
private handleMouseEnter() private handleMouseEnter()
{ {
this.hasHover = true; this.hasHover = true;

View File

@ -119,6 +119,7 @@ all addressbooks groupdav de Alle Adressbücher
all categories common de Alle Kategorien all categories common de Alle Kategorien
all days common de Alle Tage all days common de Alle Tage
all fields common de Alle Felder all fields common de Alle Felder
all files common de Alle Dateien
all in one groupdav de Gemeinsam in einem all in one groupdav de Gemeinsam in einem
all languages common de Alle Sprachen all languages common de Alle Sprachen
all operations save the template! common de Alle Operation speichern das Template! all operations save the template! common de Alle Operation speichern das Template!
@ -443,6 +444,7 @@ document '%1' does not exist or is not readable for you! preferences de Das Doku
document properties common de Dokument Eigenschaften document properties common de Dokument Eigenschaften
document title: common de Titel des Dokuments: document title: common de Titel des Dokuments:
documentation common de Dokumentation documentation common de Dokumentation
documents common de Dokumente
doesn't matter common de Spielt keine Rolle doesn't matter common de Spielt keine Rolle
domain common de Domain domain common de Domain
domain name for mail-address, eg. "%1" common de Domainname für E-Mail Adresse, z.B. "%1" domain name for mail-address, eg. "%1" common de Domainname für E-Mail Adresse, z.B. "%1"
@ -490,6 +492,7 @@ el salvador common de EL SALVADOR
element role title common de Element Rolle Titel element role title common de Element Rolle Titel
email common de E-Mail email common de E-Mail
email-address of the user, eg. "%1" common de E-Mail-Adresse des Benutzers, z.B. "%1" email-address of the user, eg. "%1" common de E-Mail-Adresse des Benutzers, z.B. "%1"
emails common de E-Mails
embeded css styles, eg. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!) common de Eingebettete CSS Stile, zb. '.red { background: red; }' (man beachte den '.' vor der CSS class) oder '@import url(...)' (Angaben gelten für die gesamte Seite!) embeded css styles, eg. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!) common de Eingebettete CSS Stile, zb. '.red { background: red; }' (man beachte den '.' vor der CSS class) oder '@import url(...)' (Angaben gelten für die gesamte Seite!)
empty file common de Datei leeren empty file common de Datei leeren
enable javascript onchange submit common de JavaScript absenden bei Änderung (onChange) aktivieren enable javascript onchange submit common de JavaScript absenden bei Änderung (onChange) aktivieren
@ -700,6 +703,7 @@ if you use "2-factor-authentication", please enter the code here. common de Wenn
image common de Grafik image common de Grafik
image directory relative to document root (use / !), example: common de Bildverzeichnis entsprechend zur Dokumentroot (benutze / !), Beispiel: image directory relative to document root (use / !), example: common de Bildverzeichnis entsprechend zur Dokumentroot (benutze / !), Beispiel:
image url common de Bild-URL image url common de Bild-URL
images common de Bilder
import common de Import import common de Import
import an etemplate from a xml-file common de Importiert ein eTemplate aus einer XML-Datei import an etemplate from a xml-file common de Importiert ein eTemplate aus einer XML-Datei
import table-definitions from existing db-table common de Importiert die Tabellen-Definition aus einer bestehenden Datenbank-Tabelle import table-definitions from existing db-table common de Importiert die Tabellen-Definition aus einer bestehenden Datenbank-Tabelle
@ -811,6 +815,7 @@ link is appended to mail allowing recipients to download or modify up to date ve
link is appended to mail allowing recipients to download up to date version of files common de Link wird an die E-Mail angefügt und erlaubt Adressaten den aktuellen Inhalt der an gehangenen Dateien herunter zu laden link is appended to mail allowing recipients to download up to date version of files common de Link wird an die E-Mail angefügt und erlaubt Adressaten den aktuellen Inhalt der an gehangenen Dateien herunter zu laden
link target %1 not found! common de Keine Verknüpfung zu %1 gefunden! link target %1 not found! common de Keine Verknüpfung zu %1 gefunden!
link title of current record common de Link-Titel des aktuellen Datensatzes link title of current record common de Link-Titel des aktuellen Datensatzes
link to each entry common de Verknüpfung zum einzelnen Eintrag
linkapps common de Verknüpfung Anwendungen linkapps common de Verknüpfung Anwendungen
linked common de Verknüpft linked common de Verknüpft
linkentry common de Verknüpfung Eintrag linkentry common de Verknüpfung Eintrag
@ -866,6 +871,10 @@ maybe common de Vieleicht
mayotte common de MAYOTTE mayotte common de MAYOTTE
medium common de Mittel medium common de Mittel
menu common de Menü menu common de Menü
merge common de Zusammenführen
merge & send common de Zusammenführen & Versenden
merge individually common de einzeln zusammenführen
merge options common de Optionen beim Zusammenführen
merged document filename preferences de Dateiname des zusammengeführten Dokuments merged document filename preferences de Dateiname des zusammengeführten Dokuments
message common de Nachricht message common de Nachricht
message ... common de Nachricht ... message ... common de Nachricht ...
@ -1184,6 +1193,7 @@ savant2 version differs from savant2 wrapper. <br/>this version: %1 <br/>savants
save common de Speichern save common de Speichern
save all common de Alle speichern save all common de Alle speichern
save as common de Speichern unter save as common de Speichern unter
save as PDF common de Als PDF speichern
save as zip common de Als ZIP-Datei speichern save as zip common de Als ZIP-Datei speichern
save selected columns as default preference for all users. common de Speichert die ausgewählten Spalten als Vorgabe für alle Benutzer. save selected columns as default preference for all users. common de Speichert die ausgewählten Spalten als Vorgabe für alle Benutzer.
save the changes made and close the window common de Speichert die Änderungen uns schließt das Fenster save the changes made and close the window common de Speichert die Änderungen uns schließt das Fenster
@ -1264,6 +1274,7 @@ select work email address common de Geschäftl. E-Mail-Adresse auswählen
select year common de Jahr auswählen select year common de Jahr auswählen
selectbox common de Auswahlbox selectbox common de Auswahlbox
selection common de Auswahl selection common de Auswahl
selection of files can only be done in one folder. %1 files unselected. common de Die Auswahl von Dateien kann nur in einem Ordner erfolgen. %1 Dateien nicht ausgewählt.
send common de Senden send common de Senden
send succeeded to %1 common de Versand erfolgreich zu %1 send succeeded to %1 common de Versand erfolgreich zu %1
senegal common de SENEGAL senegal common de SENEGAL
@ -1342,6 +1353,7 @@ spain common de SPANIEN
span common de Überspannt span common de Überspannt
span, class common de Span, Class span, class common de Span, Class
special characters common de Sonderzeichen special characters common de Sonderzeichen
spreadsheets common de Tabellenkalkulationen
sri lanka common de SRI LANKA sri lanka common de SRI LANKA
stack common de Stapel stack common de Stapel
start a new search, cancel this link common de Neue Suche starten, diese Verknüpfung abbrechen start a new search, cancel this link common de Neue Suche starten, diese Verknüpfung abbrechen
@ -1503,6 +1515,7 @@ version-number, should be in the form: major.minor.revision.number (eg. 0.9.13.0
vertical alignment of row common de Vertikale Ausrichtung der Zeile vertical alignment of row common de Vertikale Ausrichtung der Zeile
vfs upload directory common de Dateimanager Upload-Ordner vfs upload directory common de Dateimanager Upload-Ordner
video tutorials common de Video-Tutorials video tutorials common de Video-Tutorials
videos common de Videos
viet nam common de VIETNAM viet nam common de VIETNAM
view common de Anzeigen view common de Anzeigen
view linked %1 entries common de Verknüpfte %1 anzeigen view linked %1 entries common de Verknüpfte %1 anzeigen

View File

@ -119,6 +119,7 @@ all addressbooks groupdav en All addressbooks
all categories common en All categories all categories common en All categories
all days common en All days all days common en All days
all fields common en All fields all fields common en All fields
all files common en All files
all in one groupdav en All in one all in one groupdav en All in one
all languages common en All languages all languages common en All languages
all operations save the template! common en All operations save the template! all operations save the template! common en All operations save the template!
@ -444,6 +445,7 @@ document '%1' does not exist or is not readable for you! preferences en Document
document properties common en Document properties document properties common en Document properties
document title: common en Document title: document title: common en Document title:
documentation common en Documentation documentation common en Documentation
documents common en Documents
doesn't matter common en Doesn't matter doesn't matter common en Doesn't matter
domain common en Domain domain common en Domain
domain name for mail-address, eg. "%1" common en Domain name for mail address, eg. "%1" domain name for mail-address, eg. "%1" common en Domain name for mail address, eg. "%1"
@ -491,6 +493,7 @@ el salvador common en EL SALVADOR
element role title common en Element role title element role title common en Element role title
email common en Email email common en Email
email-address of the user, eg. "%1" common en Email address of the user, eg. "%1" email-address of the user, eg. "%1" common en Email address of the user, eg. "%1"
emails common en Emails
embeded css styles, eg. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!) common en Embedded CSS styles, e.g. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!) embeded css styles, eg. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!) common en Embedded CSS styles, e.g. '.red { background: red; }' (note the '.' before the class-name) or '@import url(...)' (class names are global for the whole page!)
empty file common en Empty file empty file common en Empty file
enable javascript onchange submit common en Enable JavaScript onchange submit enable javascript onchange submit common en Enable JavaScript onchange submit
@ -701,6 +704,7 @@ if you use "2-factor-authentication", please enter the code here. common en If y
image common en Image image common en Image
image directory relative to document root (use / !), example: common en Image folder relative to document root (use / !), example: image directory relative to document root (use / !), example: common en Image folder relative to document root (use / !), example:
image url common en Image URL image url common en Image URL
images common en Images
import common en Import import common en Import
import an etemplate from a xml-file common en Import an eTemplate from a XML-file import an etemplate from a xml-file common en Import an eTemplate from a XML-file
import table-definitions from existing db-table common en Import table definitions from existing DB table import table-definitions from existing db-table common en Import table definitions from existing DB table
@ -812,6 +816,7 @@ link is appended to mail allowing recipients to download or modify up to date ve
link is appended to mail allowing recipients to download up to date version of files common en Link is appended to mail allowing recipients to download up to date version of files link is appended to mail allowing recipients to download up to date version of files common en Link is appended to mail allowing recipients to download up to date version of files
link target %1 not found! common en Link target %1 not found! link target %1 not found! common en Link target %1 not found!
link title of current record common en Link title of current record link title of current record common en Link title of current record
link to each entry common en Link to each entry
linkapps common en Link apps linkapps common en Link apps
linked common en Linked linked common en Linked
linkentry common en Link entry linkentry common en Link entry
@ -867,6 +872,10 @@ maybe common en Maybe
mayotte common en MAYOTTE mayotte common en MAYOTTE
medium common en Medium medium common en Medium
menu common en Menu menu common en Menu
merge common en Merge
merge & send common en Merge & send
merge individually common en Merge individually
merge options common en Merge options
merged document filename preferences en Merged document filename merged document filename preferences en Merged document filename
message common en Message message common en Message
message ... common en Message ... message ... common en Message ...
@ -1185,6 +1194,7 @@ savant2 version differs from savant2 wrapper. <br/>this version: %1 <br/>savants
save common en Save save common en Save
save all common en Save all save all common en Save all
save as common en Save as save as common en Save as
save as PDF common en Save as PDF
save as zip common en Save as ZIP save as zip common en Save as ZIP
save selected columns as default preference for all users. common en Save columns as default preference for all users. save selected columns as default preference for all users. common en Save columns as default preference for all users.
save the changes made and close the window common en Save changes and close save the changes made and close the window common en Save changes and close
@ -1265,6 +1275,7 @@ select work email address common en Select work email address
select year common en Select year select year common en Select year
selectbox common en Select box selectbox common en Select box
selection common en Selection selection common en Selection
selection of files can only be done in one folder. %1 files unselected. common en Selection of files can only be done in one folder. %1 files unselected.
send common en Send send common en Send
send succeeded to %1 common en Send succeeded to %1 send succeeded to %1 common en Send succeeded to %1
senegal common en SENEGAL senegal common en SENEGAL
@ -1343,6 +1354,7 @@ spain common en SPAIN
span common en Span span common en Span
span, class common en Span, Class span, class common en Span, Class
special characters common en special characters special characters common en special characters
spreadsheets common en Spreadsheets
sri lanka common en SRI LANKA sri lanka common en SRI LANKA
stack common en Stack stack common en Stack
start a new search, cancel this link common en Start new search, cancel this link start a new search, cancel this link common en Start new search, cancel this link
@ -1504,6 +1516,7 @@ version-number, should be in the form: major.minor.revision.number (eg. 0.9.13.0
vertical alignment of row common en Vertical alignment of row vertical alignment of row common en Vertical alignment of row
vfs upload directory common en VFS upload folder vfs upload directory common en VFS upload folder
video tutorials common en Video Tutorials video tutorials common en Video Tutorials
videos common en Videos
viet nam common en VIET NAM viet nam common en VIET NAM
view common en View view common en View
view linked %1 entries common en View linked %1 entries view linked %1 entries common en View linked %1 entries