This commit is contained in:
@@ -66,17 +66,9 @@ CURRENT TODOs
|
|||||||
|
|
||||||
@@@@@@@@@@@ ROADMAP STAGE 2:
|
@@@@@@@@@@@ ROADMAP STAGE 2:
|
||||||
|
|
||||||
|
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 - form key for hiding / showing customization
|
todo: drag and drop image file from attachments and have it added to wiki automatically.
|
||||||
|
|
||||||
|
|
||||||
todo: clean up recently added translation keys, some are not being used and were added willy nilly
|
|
||||||
- "File" I think might be one
|
|
||||||
|
|
||||||
todo: Datadump EXPORT and RAVEN IMPORT of all attachment / wiki stuff
|
|
||||||
- v7 attached files, internal documents all handled
|
|
||||||
- Code it now
|
|
||||||
|
|
||||||
|
|
||||||
todo: AFTER ATTACHMENTS WIKI IMAGES
|
todo: AFTER ATTACHMENTS WIKI IMAGES
|
||||||
@@ -89,7 +81,7 @@ todo: AFTER ATTACHMENTS WIKI IMAGES
|
|||||||
todo: Picture input in attachments
|
todo: Picture input in attachments
|
||||||
https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/2080
|
https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/2080
|
||||||
|
|
||||||
|
todo: attached files drag and drop
|
||||||
|
|
||||||
todo: Look at attachment saving code on server, should it zip?
|
todo: Look at attachment saving code on server, should it zip?
|
||||||
|
|
||||||
@@ -102,6 +94,9 @@ todo: careful and thorough PERF tests remotely and local
|
|||||||
todo: after attachments - DATADUMP - v7 wiki to RAVEN markdown
|
todo: after attachments - DATADUMP - v7 wiki to RAVEN markdown
|
||||||
- https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3468
|
- https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3468
|
||||||
- Need to export images and attached docs as attachments
|
- Need to export images and attached docs as attachments
|
||||||
|
todo: Datadump EXPORT and RAVEN IMPORT of all attachment / wiki stuff
|
||||||
|
- v7 attached files, internal documents all handled
|
||||||
|
- Code it now
|
||||||
|
|
||||||
todo: after attachments - integration tests update
|
todo: after attachments - integration tests update
|
||||||
|
|
||||||
|
|||||||
@@ -299,6 +299,9 @@
|
|||||||
>
|
>
|
||||||
<div :style="editStyle()">
|
<div :style="editStyle()">
|
||||||
<v-textarea
|
<v-textarea
|
||||||
|
v-cloak
|
||||||
|
@drop.prevent="onDrop"
|
||||||
|
@dragover.prevent
|
||||||
solo
|
solo
|
||||||
no-resize
|
no-resize
|
||||||
:height="editAreaHeight"
|
:height="editAreaHeight"
|
||||||
@@ -382,7 +385,8 @@ export default {
|
|||||||
imageTab: null,
|
imageTab: null,
|
||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
imageText: "",
|
imageText: "",
|
||||||
selectedImageAttachment: null
|
selectedImageAttachment: null,
|
||||||
|
dropTest: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -806,7 +810,54 @@ export default {
|
|||||||
{ id: 1, name: "Stub attachment two" },
|
{ id: 1, name: "Stub attachment two" },
|
||||||
{ id: 2, name: "Stub attachment three" }
|
{ id: 2, name: "Stub attachment three" }
|
||||||
];
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
onDrop(ev) {
|
||||||
|
//Drop image file
|
||||||
|
var files = Array.from(ev.dataTransfer.files);
|
||||||
|
if (files.length > 0) {
|
||||||
|
//handle file drop
|
||||||
|
console.log("DROP:Possible files", files);
|
||||||
|
//if an image then put it directly in viewable, if not an image then make a link and keep as an attach
|
||||||
|
} else {
|
||||||
|
//maybe an url?
|
||||||
|
let url = ev.dataTransfer.getData("text");
|
||||||
|
if (url) {
|
||||||
|
//Attachment?
|
||||||
|
if (url.includes("Attachment/download/")) {
|
||||||
|
//it's an attachment url so fixup accordingly
|
||||||
|
//DROP:Possible url http://localhost:7575/api/v8.0/Attachment/download/4?t=CYs1xUgjdyaWmcq8rXlPpNNSaKpiMt8Xhi7mKRGeg8o wiki-control.vue:826
|
||||||
|
//cow(.*)milk
|
||||||
|
let m = url.match(/Attachment\/download\/(.*)\?t=/);
|
||||||
|
if (m.length > 1) {
|
||||||
|
url = "[ATTACH:" + m[1] + "]";
|
||||||
|
} else {
|
||||||
|
url = null;
|
||||||
}
|
}
|
||||||
|
if (url != null) {
|
||||||
|
//insert into textarea
|
||||||
|
let txt = this.getSelectedText();
|
||||||
|
if (txt) {
|
||||||
|
this.replaceSelectedText(
|
||||||
|
" \n' + txt //keep original selected text otherwise it will vanish
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.replaceSelectedText("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log("processed url:", url);
|
||||||
|
} else {
|
||||||
|
//External url
|
||||||
|
//todo: this
|
||||||
|
console.log("STUB: Handle external url drop");
|
||||||
|
}
|
||||||
|
|
||||||
|
//handle accordingly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------end methods----------
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user