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/07/18 12:14:46 UTC

[whimsy] branch master updated (a1bbdf6 -> 8fdbc1f)

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


    from a1bbdf6  Fix issues identified in:
     new 358b63a  stop additional validation on pressing File
     new 8fdbc1f  make project a dropdown

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 www/secretary/workbench/public/secmail.css     |  2 +-
 www/secretary/workbench/server.rb              |  1 +
 www/secretary/workbench/views/forms/icla.js.rb | 15 +++++++++------
 www/secretary/workbench/views/parts.html.rb    |  2 +-
 www/secretary/workbench/views/parts.js.rb      |  9 +++++++--
 5 files changed, 19 insertions(+), 10 deletions(-)

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

[whimsy] 02/02: make project a dropdown

Posted by ru...@apache.org.
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 8fdbc1fdcb57f69c1128169c400f9eab0c2b7821
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Jul 18 08:14:37 2017 -0400

    make project a dropdown
---
 www/secretary/workbench/public/secmail.css     |  2 +-
 www/secretary/workbench/server.rb              |  1 +
 www/secretary/workbench/views/forms/icla.js.rb | 12 +++++++-----
 www/secretary/workbench/views/parts.html.rb    |  2 +-
 www/secretary/workbench/views/parts.js.rb      |  9 +++++++--
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/www/secretary/workbench/public/secmail.css b/www/secretary/workbench/public/secmail.css
index 93420a1..fcf4996 100644
--- a/www/secretary/workbench/public/secmail.css
+++ b/www/secretary/workbench/public/secmail.css
@@ -56,7 +56,7 @@ table.form {
   margin-top: 2em;
 }
 
-.form input, .form textarea {
+.form input, .form textarea, .form select {
   width: 100%;
 }
 
diff --git a/www/secretary/workbench/server.rb b/www/secretary/workbench/server.rb
index 50f6a75..6d88601 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -120,6 +120,7 @@ get %r{/(\d{6})/(\w+)/_index_} do |month, hash|
   @headers = message.headers.dup
   @headers.delete :attachments
   @cssmtime = File.mtime('public/secmail.css').to_i
+  @projects = (ASF::Podling.current+ASF::Committee.pmcs).map(&:name).sort
   _html :parts
 end
 
diff --git a/www/secretary/workbench/views/forms/icla.js.rb b/www/secretary/workbench/views/forms/icla.js.rb
index aa244ae..3f53242 100644
--- a/www/secretary/workbench/views/forms/icla.js.rb
+++ b/www/secretary/workbench/views/forms/icla.js.rb
@@ -64,7 +64,12 @@ class ICLA < React
         _tr do
           _th 'Project'
           _td do
-            _input name: 'project', value: @project, disabled: @filed
+            _select name: 'project', value: @project, disabled: @filed do
+              _option ''
+              @@projects.each do |project|
+                _option project
+              end
+            end
           end
         end
 
@@ -117,12 +122,9 @@ class ICLA < React
 
     # new account request form - perform checks only if user is valid
     user = document.querySelector("input[name=user]")
-    project = document.querySelector("input[name=project]")
+    project = document.querySelector("select[name=project]")
     votelink = document.querySelector("input[name=votelink]")
 
-    # always validate project
-    valid &= project.validity.valid
-
     # project votelink are only required with valid users; only validate
     # votelink if the user is valid
     if user.validity.valid and user.value.length > 0
diff --git a/www/secretary/workbench/views/parts.html.rb b/www/secretary/workbench/views/parts.html.rb
index 59b07ed..b9155a4 100644
--- a/www/secretary/workbench/views/parts.html.rb
+++ b/www/secretary/workbench/views/parts.html.rb
@@ -92,7 +92,7 @@ _html do
 
   _script src: '../../app.js'
   _.render '#parts' do
-    _Parts attachments: @attachments, headers: @headers
+    _Parts attachments: @attachments, headers: @headers, projects: @projects
   end
 
 end
diff --git a/www/secretary/workbench/views/parts.js.rb b/www/secretary/workbench/views/parts.js.rb
index ed219d0..ae806da 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -154,7 +154,12 @@ class Parts < React
 
             _label do
               _span 'project: '
-              _input name: 'project', value: @project
+              _select name: 'project', value: @project, disabled: @filed do
+                _option ''
+                @@projects.each do |project|
+                  _option project
+                end
+              end
             end
           end
 
@@ -195,7 +200,7 @@ class Parts < React
       else
 
         React.createElement @form, headers: @headers, selected: @selected,
-          signature: signature
+          projects: @@projects, signature: signature
 
       end
     end

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

[whimsy] 01/02: stop additional validation on pressing File

Posted by ru...@apache.org.
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 358b63a77893bc2ab3f4773a10690011ac4032e7
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Jul 18 08:10:48 2017 -0400

    stop additional validation on pressing File
---
 www/secretary/workbench/views/forms/icla.js.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/secretary/workbench/views/forms/icla.js.rb b/www/secretary/workbench/views/forms/icla.js.rb
index 4c81414..aa244ae 100644
--- a/www/secretary/workbench/views/forms/icla.js.rb
+++ b/www/secretary/workbench/views/forms/icla.js.rb
@@ -77,7 +77,8 @@ class ICLA < React
         end
       end
 
-      _input.btn.btn_primary value: 'File', type: 'submit', ref: 'file'
+      _input.btn.btn_primary value: 'File', type: 'submit', ref: 'file',
+        formnovalidate: true
     end
   end
 

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