var uploads = [] ; // everything the user has uploaded
+// Remove the upload window completely (even if it's hidden)
+function deactivate_uploads() {
+ document.getElementById("ctdl-upload").remove();
+}
+
+
// Turn the specified div into a place where we can upload. (Note: permanently changes the drag-and-drop behavior of that div.)
function activate_uploads(parent_div) {
document.getElementById(parent_div).innerHTML += `
console.log(u.ref);
});
uploads=[];
+
+ deactivate_uploads(); // this makes the window get destroyed too
}
document.getElementById("ctdl-compose-cc-field").style.display = "block";
}
- activate_uploads("ctdl-compose-mail");
+ activate_uploads("ctdl-editor-body");
}
// Called when the user clicks the button to make the hidden "CC" and "BCC" lines appear.
function mail_send_message() {
document.body.style.cursor = "wait";
+ deactivate_uploads();
let url = "/ctdl/r/" + escapeHTMLURI(current_room)
+ "/dummy_name_for_new_mail"
+ "?wefw=" + msm_field("ctdl_mc_references", "!") // references (if present)