mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 02:15:19 +00:00
initialise jot editor if it is used as a file drop target and isn't yet opened.
This commit is contained in:
parent
99c5aca78b
commit
6c672d2575
1 changed files with 6 additions and 1 deletions
|
@ -503,6 +503,7 @@ function enableOnUser(){
|
|||
|
||||
// cancel event and hover styling
|
||||
DragDropUploadFileHover(e);
|
||||
if (!editor) $("#profile-jot-text").val("");
|
||||
|
||||
|
||||
// fetch FileList object
|
||||
|
@ -527,7 +528,11 @@ function enableOnUser(){
|
|||
xhr.addEventListener('load', function (e) {
|
||||
//console.log('xhr upload complete', e);
|
||||
window.fileUploadsCompleted = window.fileUploadsCompleted + 1;
|
||||
addeditortext(xhr.responseText);
|
||||
|
||||
initEditor(function() {
|
||||
addeditortext(xhr.responseText);
|
||||
});
|
||||
|
||||
$('#jot-media').val($('#jot-media').val() + xhr.responseText);
|
||||
// When all the uploads have completed, refresh the page
|
||||
if (window.filesToUpload > 0 && window.fileUploadsCompleted === window.filesToUpload) {
|
||||
|
|
Loading…
Reference in a new issue