deactivate_uploads() hides the window.
[citadel.git] / webcit-ng / static / js / upload.js
index 228e97aceb5f2e0b57f07f68049cfb852cc6f6a0..6dbd92e64e935fe372de20263131fb839c70e5da 100644 (file)
@@ -10,6 +10,12 @@ var uploads_in_progress = 0;
 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 += `
@@ -152,4 +158,6 @@ function flush_uploads() {
                console.log(u.ref);
        });
         uploads=[];
+
+       deactivate_uploads();   // this makes the window get destroyed too
 }