Skip to content
Snippets Groups Projects
Commit 1e929367 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Sync filesource and filesink

parent 8d1e648a
Branches
No related tags found
No related merge requests found
......@@ -43,6 +43,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
this.queuedFilesSignaturePlacements = [];
this.queuedFilesPlacementModes = [];
this.currentPreviewQueueKey = '';
}
static get scopedElements() {
......@@ -78,6 +80,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
signaturePlacementInProgress: { type: Boolean, attribute: false },
withSigBlock: { type: Boolean, attribute: false },
isSignaturePlacement: { type: Boolean, attribute: false },
};
}
......@@ -204,7 +207,6 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
* @param ev
*/
onFileSelected(ev) {
console.log("File was selected: ev", ev);
this.queueFile(ev.detail.file);
}
......@@ -257,10 +259,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
});
break;
}
// console.log(propName, oldValue);
});
super.update(changedProperties);
}
......@@ -600,6 +599,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
* @returns {*[]} Array of html templates
*/
getQueuedFilesHtml() {
const ids = Object.keys(this.queuedFiles);
let results = [];
......@@ -736,6 +736,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
text="${i18n.t('official-pdf-upload.upload-area-text')}"
button-label="${i18n.t('official-pdf-upload.upload-button-label')}"
@dbp-file-source-file-selected="${this.onFileSelected}"
@dbp-file-source-switched="${this.onFileSourceSwitch}"
></dbp-file-source>
</div>
</div>
......@@ -870,6 +871,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem
nextcloud-auth-url="${nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${nextcloudWebDavURL}"
nextcloud-name="${nextcloudName}"
nextcloud-default="${this.nextcloudDefaultDir}"
default-sink="${this.fileSource}"
lang="${this.lang}"
></dbp-file-sink>
`;
......
......@@ -152,7 +152,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
});
await this.uploadFile(file, params);
this.uploadInProgress = false;
this.uploadInProgr666666666666666ess = false;
}
storePDFData(event) {
......@@ -896,6 +896,7 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
text="${i18n.t('qualified-pdf-upload.upload-area-text')}"
button-label="${i18n.t('qualified-pdf-upload.upload-button-label')}"
@dbp-file-source-file-selected="${this.onFileSelected}"
@dbp-file-source-switched="${this.onFileSourceSwitch}"
></dbp-file-source>
</div>
</div>
......@@ -1042,6 +1043,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle
nextcloud-auth-url="${nextcloudWebAppPasswordURL}"
nextcloud-web-dav-url="${nextcloudWebDavURL}"
nextcloud-name="${nextcloudName}"
nextcloud-default="${this.nextcloudDefaultDir}"
default-sink="${this.fileSource}"
lang="${this.lang}"
></dbp-file-sink>
`;
......
......@@ -16,6 +16,9 @@ export default class DBPSignatureLitElement extends LitElement {
this.fileSourceUrl = "";
this.showTestNextcloudFilePicker = buildinfo.env !== 'production';
this.fileSource = '';
this.nextcloudDefaultDir = '';
}
/**
......@@ -142,6 +145,17 @@ export default class DBPSignatureLitElement extends LitElement {
this.onFileUploadFinished(data);
}
onFileSourceSwitch(event)
{
if (event.detail.source) {
this.fileSource = event.detail.source;
}
if (event.detail.nextcloud) {
this.nextcloudDefaultDir = event.detail.nextcloud;
}
event.preventDefault();
}
/**
* @param data
*/
......
Subproject commit dcd4d7b101b8f87939496916a4d53d41867ac696
Subproject commit 589b53991ce657d41916901c2a8a1b5b4da32e55
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment