whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: give each form on the page a different id
Date Thu, 11 Apr 2019 17:51:31 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new b324710  give each form on the page a different id
b324710 is described below

commit b324710b1728260b04fad73e36ffc3f3cff04460
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Apr 11 13:51:15 2019 -0400

    give each form on the page a different id
---
 www/board/agenda/views/buttons/email.js.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/board/agenda/views/buttons/email.js.rb b/www/board/agenda/views/buttons/email.js.rb
index 1c6dbc8..d38008f 100644
--- a/www/board/agenda/views/buttons/email.js.rb
+++ b/www/board/agenda/views/buttons/email.js.rb
@@ -11,7 +11,7 @@ class Email < Vue
     _button.btn 'send email', class: self.mailto_class(),
       onClick: self.launch_email_client
 
-    _EmailForm email: @email
+    _EmailForm email: @email, id: @@item.mail_list
   end
 
   # render 'send email' as a primary button if the viewer is the shepherd for
@@ -91,7 +91,7 @@ class Email < Vue
         body: body
       }
 
-      jQuery('#email-form').modal(:show)
+      jQuery('#email-' + @@item.mail_list).modal(:show)
     else
       window.location = "mailto:#{to}?cc=#{cc}" +
         "&subject=#{encodeURIComponent(subject)}" +
@@ -102,7 +102,7 @@ end
 
 class EmailForm < Vue
   def render
-    _ModalDialog.email_form! color: 'commented' do
+    _ModalDialog color: 'commented', id: 'email-' + @@id do
       _h4 "Send email - #{@@email.subject}"
 
       # input field: to
@@ -141,7 +141,7 @@ class EmailForm < Vue
     post 'email', @@email do |response|
       console.log response
       @disabled = false
-      jQuery('#email-form').modal(:hide)
+      jQuery('#email-' + @@id).modal(:hide)
       document.body.classList.remove('modal-open')
     end
   end


Mime
View raw message