From aea4eacd3b03bbd7c9536a183927492330cc8fcb Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Tue, 30 Jun 2020 12:50:57 +0200 Subject: [PATCH] Add attribute select-button-text (#13) --- packages/file-handling/src/vpu-nextcloud-file-picker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/file-handling/src/vpu-nextcloud-file-picker.js b/packages/file-handling/src/vpu-nextcloud-file-picker.js index 8006b848..5aaaa793 100644 --- a/packages/file-handling/src/vpu-nextcloud-file-picker.js +++ b/packages/file-handling/src/vpu-nextcloud-file-picker.js @@ -21,6 +21,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(VPULitElement) { this.webDavUrl = ''; this.loginWindow = null; this.isPickerActive = false; + this.selectButtonText = i18n.t('nextcloud-file-picker.select-files'); this.statusText = ''; this.lastDirectoryPath = '/'; this.directoryPath = '/'; @@ -52,6 +53,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(VPULitElement) { directoryPath: { type: String, attribute: false }, allowedMimeTypes: { type: String, attribute: 'allowed-mime-types' }, directoriesOnly: { type: Boolean, attribute: 'directories-only' }, + selectButtonText: { type: String, attribute: 'select-button-text' }, }; } @@ -319,7 +321,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(VPULitElement) { @click="${() => { this.loadDirectory(this.getParentDirectoryPath()); }}">⇧</button> <table id="directory-content-table"></table> <button class="button" - @click="${() => { this.downloadFiles(this.tabulatorTable.getSelectedData()); }}">${i18n.t('nextcloud-file-picker.select-files')}</button> + @click="${() => { this.downloadFiles(this.tabulatorTable.getSelectedData()); }}">${this.selectButtonText}</button> </div> `; } -- GitLab