This is an automated email from the ASF dual-hosted git repository.
curcuru 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 fe614db Add ids to each section, add jquery for collapse panels
fe614db is described below
commit fe614db9cbd046f8871b5d09dca7478151bc039a
Author: Shane Curcuru <[email protected]>
AuthorDate: Wed May 3 20:17:12 2017 -0400
Add ids to each section, add jquery for collapse panels
---
www/brand/list.cgi | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/www/brand/list.cgi b/www/brand/list.cgi
index 79dc2a1..0528809 100755
--- a/www/brand/list.cgi
+++ b/www/brand/list.cgi
@@ -8,6 +8,7 @@ require 'json'
require 'whimsy/asf'
require 'wunderbar'
require 'wunderbar/bootstrap'
+require 'wunderbar/jquery'
require 'net/http'
# Fieldnames/values from counsel provided docket.csv
@@ -52,23 +53,23 @@ _json do
csv2json
end
-def _unreg(name, url, desc, parent, n)
- _div.panel.panel_default do
+def _unreg(pmc, proj, parent, n)
+ _div.panel.panel_default id: pmc do
_div.panel_heading role: "tab", id: "urh#{n}" do
_h4.panel_title do
_a role: "button", data_toggle: "collapse", aria_expanded: "true",
data_parent: "##{parent}", href: "#urc#{n}", aria_controls: "#urc#{n}" do
- _ name
+ _ proj['name']
_{"™ software"}
end
end
end
_div.panel_collapse.collapse.in id: "#urc#{n}", role: "tabpanel",
aria_labelledby: "urh#{n}" do
_div.panel_body do
- _a href: url do
- _ name
+ _a href: proj['homepage'] do
+ _ proj['name']
end
_ ': '
- _ desc
+ _ proj['description']
end
end
end
@@ -95,23 +96,23 @@ def _marks(marks)
end
end
-def _project(name, url, marks)
- _div.panel.panel_primary do
+def _project(pmc, proj, marks)
+ _div.panel.panel_primary id: pmc do
_div.panel_heading do
_h3!.panel_title do
- _a! name, href: url
+ _a! proj['name'], href: proj['homepage']
_{"® software"}
end
end
_div.panel_body do
- _{"The ASF owns the following registered trademarks for our #{name}®
software:"}
+ _{"The ASF owns the following registered trademarks for our
#{proj['name']}® software:"}
end
_marks marks
end
end
def _apache(marks)
- _div.panel.panel_primary do
+ _div.panel.panel_primary id: 'apache' do
_div.panel_heading do
_h3.panel_title do
_{"Our APACHE® trademarks"}
@@ -137,7 +138,7 @@ _html do
if pmc == 'apache' then
_apache(marks)
elsif projects[pmc] then
- _project projects[pmc]['name'], projects[pmc]['homepage'], marks
+ _project pmc, projects[pmc], marks
else
_.comment! '# TODO map all pmc names to projects or podlings'
_project 'Apache ' + pmc.capitalize, 'https://' + pmc +
'.apache.org', marks
@@ -149,7 +150,7 @@ _html do
_div.panel_group id: parent, role: "tablist", aria_multiselectable:
"true" do
projects.each_with_index do |(pnam, proj), num|
unless docket[pnam] then
- _unreg(proj['name'], proj['homepage'], proj['description'],
parent, num)
+ _unreg(pnam, proj, parent, num)
end
end
end
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].