summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c0342d4)
This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.
);
if (response.ok) { // If the server accepted the delete, remove it from the screen
);
if (response.ok) { // If the server accepted the delete, remove it from the screen
+ console.log("server deleted " + ref);
+ var el = document.getElementById(ref);
+ el.parentNode.removeChild(el);
// Add these uploads to the displayed list
j_response.forEach((item) => {
let new_upl = document.createElement("li");
// Add these uploads to the displayed list
j_response.forEach((item) => {
let new_upl = document.createElement("li");
- // item["ref"] is what we need
+ new_upl.setAttribute("id", item["ref"]); // set the element id to the upload reference
new_upl.innerHTML = `<i class="fa-solid fa-circle-xmark" style="color:red" onClick="delete_upload('` + item["ref"] + `')"></i>`
+ ` `
+ item["uploadfilename"] + " (" + item["contenttype"] + ", " + item["contentlength"] + " " + _("bytes") + ")";
new_upl.innerHTML = `<i class="fa-solid fa-circle-xmark" style="color:red" onClick="delete_upload('` + item["ref"] + `')"></i>`
+ ` `
+ item["uploadfilename"] + " (" + item["contenttype"] + ", " + item["contentlength"] + " " + _("bytes") + ")";
fetch_stat = async() => {
response = await fetch(url);
stat = await(response.json());
fetch_stat = async() => {
response = await fetch(url);
stat = await(response.json());
- if (stat.room_mtime > room_mtime) { // FIXME commented out to force refreshes
+ if (stat.room_mtime > room_mtime) { // if modified...
room_mtime = stat.room_mtime;
room_mtime = stat.room_mtime;
- render_mailbox_display(newmail_notify.YES);
+ render_mailbox_display(newmail_notify.YES); // ...force a refresh