Skip to content
Snippets Groups Projects
Unverified Commit b86b3fb6 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Rename FilePicker to NextcloudFilePicker

parent 9a8d6a9b
No related branches found
No related tags found
No related merge requests found
Pipeline #11849 passed with warnings
......@@ -13,9 +13,9 @@ import Tabulator from 'tabulator-tables';
const i18n = createI18nInstance();
/**
* FilePicker web component
* NextcloudFilePicker web component
*/
export class FilePicker extends ScopedElementsMixin(VPULitElement) {
export class NextcloudFilePicker extends ScopedElementsMixin(VPULitElement) {
constructor() {
super();
this.lang = 'de';
......@@ -77,6 +77,7 @@ export class FilePicker extends ScopedElementsMixin(VPULitElement) {
// see: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
window.addEventListener('message', this._onReceiveWindowMessage);
// http://tabulator.info/docs/4.7
this.tabulatorTable = new Tabulator(this._("#directory-content-table"), {});
});
}
......@@ -184,8 +185,8 @@ export class FilePicker extends ScopedElementsMixin(VPULitElement) {
<link rel="stylesheet" href="${tabulatorCss}">
<div class="block">
<button class="button"
title="${i18n.t('file-picker.open-file-picker')}"
@click="${async () => { this.openFilePicker(); } }">${i18n.t('file-picker.open')}</button>
title="${i18n.t('nextcloud-file-picker.open-nextcloud-file-picker')}"
@click="${async () => { this.openFilePicker(); } }">${i18n.t('nextcloud-file-picker.open')}</button>
</div>
<div class="block ${classMap({hidden: this.statusText === ""})}">
<vpu-mini-spinner style="font-size: 0.7em"></vpu-mini-spinner>
......
......@@ -13,7 +13,7 @@ import {classMap} from 'lit-html/directives/class-map.js';
import {FileUpload} from 'vpu-file-upload';
import JSONLD from "vpu-common/jsonld";
import {TextSwitch} from './textswitch.js';
import {FilePicker} from "./vpu-file-picker";
import {NextcloudFilePicker} from "./vpu-nextcloud-file-picker";
import nextcloudWebAppPasswordURL from 'consts:nextcloudWebAppPasswordURL';
import nextcloudWebDavURL from 'consts:nextcloudWebDavURL';
......@@ -64,7 +64,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
'vpu-mini-spinner': MiniSpinner,
'vpu-button': Button,
'vpu-textswitch': TextSwitch,
'vpu-file-picker': FilePicker,
'vpu-nextcloud-file-picker': NextcloudFilePicker,
};
}
......@@ -1077,7 +1077,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(VPUSignatureLitEle
<vpu-mini-spinner></vpu-mini-spinner>
</div>
<!-- File picker test -->
<!-- <vpu-file-picker lang="${this.lang}" auth-url="${nextcloudWebAppPasswordURL}" web-dav-url="${nextcloudWebDavURL}"></vpu-file-picker>-->
<!-- <vpu-nextcloud-file-picker lang="${this.lang}" auth-url="${nextcloudWebAppPasswordURL}" web-dav-url="${nextcloudWebDavURL}"></vpu-nextcloud-file-picker>-->
`;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment