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 2017/10/20 01:33:08 UTC

[whimsy] branch master updated: update vote form to track agenda item

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 44cdab2  update vote form to track agenda item
44cdab2 is described below

commit 44cdab2d24d62e0e8636defd08685ad985830adf
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Oct 19 21:32:41 2017 -0400

    update vote form to track agenda item
---
 www/board/agenda/views/buttons/add-comment.js.rb |  3 ++-
 www/board/agenda/views/buttons/add-minutes.js.rb |  3 ++-
 www/board/agenda/views/buttons/vote.js.rb        | 13 +++++++++++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/www/board/agenda/views/buttons/add-comment.js.rb b/www/board/agenda/views/buttons/add-comment.js.rb
index 00505b1..ee5cb96 100644
--- a/www/board/agenda/views/buttons/add-comment.js.rb
+++ b/www/board/agenda/views/buttons/add-comment.js.rb
@@ -62,12 +62,13 @@ class AddComment < Vue
     end
   end
 
-  # autofocus on comment text
   def mounted()
+    # update comment text to match current item
     jQuery('#comment-form').on 'show.bs.modal' do
       @base = @comment = @@item.pending
     end
 
+    # autofocus on comment text
     jQuery('#comment-form').on 'shown.bs.modal' do
       document.getElementById("comment-text").focus()
     end
diff --git a/www/board/agenda/views/buttons/add-minutes.js.rb b/www/board/agenda/views/buttons/add-minutes.js.rb
index c3a12d2..3f853b0 100644
--- a/www/board/agenda/views/buttons/add-minutes.js.rb
+++ b/www/board/agenda/views/buttons/add-minutes.js.rb
@@ -73,12 +73,13 @@ class AddMinutes < Vue
     end
   end
 
-  # autofocus on minute text
   def mounted()
+    # update form to match current item
     jQuery('#minute-form').on 'show.bs.modal' do
       self.setup(@@item)
     end
 
+    # autofocus on minute text
     jQuery('#minute-form').on 'shown.bs.modal' do
       document.getElementById("minute-text").focus()
     end
diff --git a/www/board/agenda/views/buttons/vote.js.rb b/www/board/agenda/views/buttons/vote.js.rb
index 913776a..702a6fe 100644
--- a/www/board/agenda/views/buttons/vote.js.rb
+++ b/www/board/agenda/views/buttons/vote.js.rb
@@ -49,6 +49,19 @@ class Vote < Vue
     self.setup(@@item)
   end
 
+  def mounted()
+    # update form to match current item
+    jQuery('#comment-form').on 'show.bs.modal' do
+      self.setup(@@item)
+    end
+
+    # autofocus on comment text
+    jQuery('#comment-form').on 'shown.bs.modal' do
+      document.getElementById("vote-text").focus()
+    end
+  end
+
+
   # reset base, draft minutes, directors present, and vote type
   def setup(item)
     @directors = Minutes.directors_present

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].