aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/alps/assets/attachments.js6
-rw-r--r--themes/alps/assets/style.css1
2 files changed, 7 insertions, 0 deletions
diff --git a/themes/alps/assets/attachments.js b/themes/alps/assets/attachments.js
index e519c29..a57b4c5 100644
--- a/themes/alps/assets/attachments.js
+++ b/themes/alps/assets/attachments.js
@@ -75,6 +75,12 @@ function attachFile(file) {
};
attachments.push(attachment);
attachmentsNode.appendChild(node);
+ node.querySelector("button").addEventListener("click", ev => {
+ attachment.xhr.abort();
+ attachments = attachments.filter(a => a !== attachment);
+ node.remove();
+ updateState();
+ });
let formData = new FormData();
formData.append("attachments", file);
diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css
index 389079c..388f25f 100644
--- a/themes/alps/assets/style.css
+++ b/themes/alps/assets/style.css
@@ -234,6 +234,7 @@ main.create-update #attachment-list .upload .filename {
main.create-update #attachment-list .upload button {
padding: inherit;
+ min-width: inherit;
}
main.create-update #attachment-list .upload .progress {