Skip to content

Commit b3d6f87

Browse files
committed
Hopefully fully fixed the sorting issue on members list. This time via javascript
1 parent bc285c8 commit b3d6f87

File tree

4 files changed

+61
-27
lines changed

4 files changed

+61
-27
lines changed

_layouts/default.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
<link rel="stylesheet" type="text/css" href="/stylesheets/pygment_trac.css" media="screen" />
99
<link rel="stylesheet" type="text/css" href="/stylesheets/print.css" media="print" />
1010
<link rel="alternate" type="application/atom+xml" title="Atom Feed for PythonPune" href="/atom.xml" />
11+
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
12+
<script type="text/javascript" src="/javascripts/jquery.tinysort.min.js"></script>
1113
<title>PythonPune by pythonpune</title>
14+
<script type="text/javascript">
15+
function page_callback() {
16+
// do nothing;
17+
}
18+
</script>
1219
</head>
1320

1421
<body>
@@ -38,9 +45,8 @@ <h2>Pune Pythonistas and their discussions and events.</h2>
3845

3946
</body>
4047
<script type="text/javascript">
41-
document.getElementById("forum_embed").src =
42-
"https://groups.google.com/forum/embed/?place=forum/pythonpune" +
43-
"&theme=default&showtabs=false&hideforumtitle=true&showpopout=true" +
44-
encodeURIComponent(window.location.href);
48+
$(document).ready(function() {
49+
page_callback();
50+
});
4551
</script>
4652
</html>

index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ <h2>Recent Discussions</h2>
3636
width="900"
3737
height="700">
3838
</iframe>
39+
40+
<script type="text/javascript">
41+
function page_callback() {
42+
document.getElementById("forum_embed").src =
43+
"https://groups.google.com/forum/embed/?place=forum/pythonpune" +
44+
"&theme=default&showtabs=false&hideforumtitle=true&showpopout=true" +
45+
encodeURIComponent(window.location.href);
46+
}
47+
</script>

javascripts/jquery.tinysort.min.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

members/index.html

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,36 @@
33
---
44
<h1>PythonPune Members</h1>
55
<em>Note: This page only lists those members who have chosen to publish their information here.</em><br/>
6-
<table>
7-
<tr>
8-
<th>Name</th>
9-
<th>Github</th>
10-
<th>Bitbucket</th>
11-
<th>Twitter</th>
12-
<th>Blog</th>
13-
<th>Homepage</th>
14-
</tr>
15-
{% assign all_pages = site.pages | sort: 'url' %}
16-
{% for page in all_pages %}
17-
{% capture prefix %}{{page.url | truncate: 15, ''}}{% endcapture%}
18-
{% if prefix == "/members/pages/" %}
19-
<tr>
20-
<td><a href="{{page.url}}">{{page.name}}{% if page.twitter_id %} (@{{page.twitter_id}}){% endif %}</a></td>
21-
{% if page.github_id %}<td><a href="http://github.com/{{page.github_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
22-
{% if page.bitbucket_id %}<td><a href="http://bitbucket.org/{{page.bitbucket_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
23-
{% if page.twitter_id %}<td><a href="http://twitter.com/{{page.twitter_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
24-
{% if page.blog %}<td><a href="{{page.blog}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
25-
{% if page.homepage %}<td><a href="{{page.homepage}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
26-
</tr>
27-
{% endif %}
28-
{% endfor %}
6+
<table id="members_table">
7+
<thead>
8+
<tr>
9+
<th>Name</th>
10+
<th>Github</th>
11+
<th>Bitbucket</th>
12+
<th>Twitter</th>
13+
<th>Blog</th>
14+
<th>Homepage</th>
15+
</tr>
16+
</thead>
17+
<tbody>
18+
{% assign all_pages = site.pages | sort: 'url' %}
19+
{% for page in site.pages %}
20+
{% capture prefix %}{{page.url | truncate: 15, ''}}{% endcapture%}
21+
{% if prefix == "/members/pages/" %}
22+
<tr>
23+
<td><a href="{{page.url}}">{{page.name}}{% if page.twitter_id %} (@{{page.twitter_id}}){% endif %}</a></td>
24+
{% if page.github_id %}<td><a href="http://github.com/{{page.github_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
25+
{% if page.bitbucket_id %}<td><a href="http://bitbucket.org/{{page.bitbucket_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
26+
{% if page.twitter_id %}<td><a href="http://twitter.com/{{page.twitter_id}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
27+
{% if page.blog %}<td><a href="{{page.blog}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
28+
{% if page.homepage %}<td><a href="{{page.homepage}}">&#x2713;</a></td>{% else %}<td>&nbsp;</td>{% endif %}
29+
</tr>
30+
{% endif %}
31+
{% endfor %}
32+
</tbody>
2933
</table>
34+
<script>
35+
function page_callback() {
36+
$("#members_table tbody tr").tsort();
37+
}
38+
</script>

0 commit comments

Comments
 (0)