This commit is contained in:
2020-04-24 19:59:37 +00:00
parent a94792d77c
commit b7d4cd9f6c
2 changed files with 17 additions and 4 deletions

View File

@@ -67,9 +67,8 @@ CURRENT TODOs
@@@@@@@@@@@ ROADMAP STAGE 2:
todo: wiki emit input on change: currently it's manual but it should just either WATCH for changes or the replace text method should do the triggering since it's called for all ops
todo: drag and drop files on to attachments and have them stored and added automatically
todo: drag and drop image file on to wiki and have it added as attachment then linked automatically
todo: Attachments control, sb minimized on parent form open and only do it's thing when expanded like wiki
- i.e. don't bother fetching until the user expands it

View File

@@ -1,5 +1,11 @@
<template>
<div class="mt-6" v-resize="onResize">
<div
class="mt-6"
v-resize="onResize"
v-cloak
@drop.prevent="onDrop"
@dragover.prevent
>
<span class="v-label v-label--active theme--light">
{{ $ay.t("Attachments") }}
</span>
@@ -235,7 +241,7 @@ export default {
ret.push({
id: o.id,
concurrencyToken: o.concurrencyToken,
url: window.$gz.api.downloadUrl(o.id,o.contentType),
url: window.$gz.api.downloadUrl(o.id, o.contentType),
name: o.displayFileName,
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
o.lastModified,
@@ -313,6 +319,14 @@ export default {
.catch(function handleUploadError(error) {
window.$gz.errorHandler.handleFormError(error);
});
},
onDrop(ev) {
//handle file drop
var files = Array.from(ev.dataTransfer.files);
if (files.length > 0) {
this.uploadFiles = files;
this.upload();
}
}
//-----
}