This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 36e353c0 Don't delete attachments on completion
36e353c0 is described below
commit 36e353c0ceac282f988ab1504eac4b8992acd6b2
Author: Sebb <[email protected]>
AuthorDate: Sat May 4 00:34:01 2024 +0100
Don't delete attachments on completion
Makes it easier to reprocess if necessary
---
www/secretary/workbench/views/parts.js.rb | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/www/secretary/workbench/views/parts.js.rb
b/www/secretary/workbench/views/parts.js.rb
index a5a2558c..84717462 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -543,6 +543,18 @@ class Parts < Vue
}
end
+ # delete a message (keeping attachments)
+ def delete_message(event)
+ @busy = true
+ pathname = window.parent.location.pathname
+ HTTP.delete(pathname).then {
+ window.parent.location.href = '../..'
+ }.catch {|error|
+ alert error
+ @busy = false
+ }
+ end
+
# delete an attachment
def delete_attachment(event)
data = {
@@ -736,7 +748,7 @@ class Parts < Vue
# tasklist completion events
def status_update(event)
if event.data.status == 'complete'
- self.delete_attachment(event)
+ self.delete_message(event)
elsif event.data.status == 'keep'
@selected = nil
@form = :categorize