You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2018/05/13 00:14:31 UTC
[whimsy] 02/02: tweak to and cc for complete reports
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 48f55738c1f4c8be8e5c18bb866a7885598e3616
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sat May 12 20:14:00 2018 -0400
tweak to and cc for complete reports
---
www/board/agenda/views/buttons/email.js.rb | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb
index f41976d..d13f032 100644
--- a/www/board/agenda/views/buttons/email.js.rb
+++ b/www/board/agenda/views/buttons/email.js.rb
@@ -26,7 +26,8 @@ class Email < Vue
mail_list = @@item.mail_list
mail_list = "private@#{mail_list}.apache.org" unless mail_list.include? '@'
- destination = "mailto:#{@@item.chair_email}?cc=#{mail_list},#{@@item.cc}"
+ to = @@item.chair_email
+ cc = "#{mail_list},#{@@item.cc}"
if @@item.missing
subject = "Missing #{@@item.title} Board Report"
@@ -52,10 +53,16 @@ class Email < Vue
body = body.strip().gsub(/#{indent}/, "\n").gsub(/(\S)\n(\S)/, "$1 $2")
else
subject = "#{@@item.title} Board Report"
- body = @@item.comments.join("\n\n") || @@item.text
+ body = @@item.comments.join("\n\n")
+
+ if not body and @@item.text
+ to = mail_list
+ cc = @@item.cc
+ body = @@item.text
+ end
end
- window.location = destination +
+ window.location = "mailto:#{to}?cc=#{cc}" +
"&subject=#{encodeURIComponent(subject)}" +
"&body=#{encodeURIComponent(body)}"
end
--
To stop receiving notification emails like this one, please contact
rubys@apache.org.