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 2016/06/09 02:25:13 UTC
[whimsy] branch master updated: make table sortable
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 1244222 make table sortable
1244222 is described below
commit 1244222ac56da1d10610e777e2ce9dcefc490127
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Wed Jun 8 22:24:52 2016 -0400
make table sortable
---
www/members/assets/stupidtable.min.js | 1 +
www/members/memberless-pmcs.cgi | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/www/members/assets/stupidtable.min.js b/www/members/assets/stupidtable.min.js
new file mode 100644
index 0000000..fa3cdd5
--- /dev/null
+++ b/www/members/assets/stupidtable.min.js
@@ -0,0 +1 @@
+(function(d){d.fn.stupidtable=function(b){return this.each(function(){var a=d(this);b=b||{};b=d.extend({},d.fn.stupidtable.default_sort_fns,b);var n=function(a,b){for(var f=[],c=0,e=a.slice(0).sort(b),h=0;h<a.length;h++){for(c=d.inArray(a[h],e);-1!=d.inArray(c,f);)c++;f.push(c)}return f},q=function(a,b){for(var d=a.slice(0),c=0,e=0;e<b.length;e++)c=b[e],d[c]=a[e];return d};a.on("click","th",function(){var m=a.children("tbody").children("tr"),g=d(this),f=0,c=d.fn.stupidtable.dir;a.find("t [...]
diff --git a/www/members/memberless-pmcs.cgi b/www/members/memberless-pmcs.cgi
index 885653b..84ec84f 100755
--- a/www/members/memberless-pmcs.cgi
+++ b/www/members/memberless-pmcs.cgi
@@ -6,6 +6,8 @@
require 'whimsy/asf'
require 'wunderbar/bootstrap'
+require 'wunderbar/jquery/stupidtable'
+require 'date'
members = ASF::Member.list.keys
committees = ASF::Committee.load_committee_info
@@ -40,9 +42,9 @@ _html do
_table_.table.table_striped do
_thead_ do
_tr do
- _th 'PMC'
- _th 'Established'
- _th 'Count' if count > 1
+ _th 'PMC', data_sort: 'string-ins'
+ _th 'Established', data_sort: 'string'
+ _th 'Count', data_sort: 'int' if count > 1
end
end
@@ -54,10 +56,14 @@ _html do
_td! do
_a pmc.display_name, href: "../roster/committee/#{pmc.id}"
end
- _td pmc.established
+ _td Date.parse(pmc.established).strftime('%Y/%m')
_td (pmc.roster.keys & members).length if count > 1
end
end
end
end
+
+ _script %{
+ $(".table").stupidtable();
+ }
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].