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: show iclas, and go back to the original
Date Fri, 19 May 2017 23:34:07 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  159a208   show iclas, and go back to the original
159a208 is described below

commit 159a208dfccacd09592ac887b80d586c35e885db
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Fri May 19 19:33:32 2017 -0400

    show iclas, and go back to the original
---
 www/secretary/workbench/server.rb               | 9 +++++++++
 www/secretary/workbench/views/forms/icla2.js.rb | 6 +++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/www/secretary/workbench/server.rb b/www/secretary/workbench/server.rb
index d62645a..0a2bcf5 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -194,6 +194,15 @@ get '/iclas.json' do
   list.to_json
 end
 
+# redirect to an icla
+get %r{/icla/(.*)} do |filename|
+  checkout = 'https://svn.apache.org/repos/private/documents/iclas'
+  iclas = ASF::SVN['private/documents/iclas']
+  file = Dir["#{iclas}/#{filename}", "#{iclas}/#{filename}.*"].first
+  pass unless file
+  redirect to(checkout + '/' + File.basename(file))
+end
+
 # event stream for server sent events (a.k.a EventSource)
 get '/events', provides: 'text/event-stream' do
   events = Events.new
diff --git a/www/secretary/workbench/views/forms/icla2.js.rb b/www/secretary/workbench/views/forms/icla2.js.rb
index 892d272..948ce60 100644
--- a/www/secretary/workbench/views/forms/icla2.js.rb
+++ b/www/secretary/workbench/views/forms/icla2.js.rb
@@ -31,7 +31,11 @@ class ICLA2 < React
           then
             _li do
               _input type: 'radio', name: 'icla',
-                onClick: -> {@icla = icla} 
+                onClick: -> {
+                  window.parent.frames.content.location.href = 
+                    location.toString()[/.*\//] + @@selected
+                  @icla = icla
+                }
               _a icla.name, href: "../../icla/#{icla.filename}",
                 target: 'content'
            end

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

Mime
View raw message