Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonathan Bell
srctweb
Commits
f0548e2e
Commit
f0548e2e
authored
Apr 05, 2018
by
Daniel W Bond
Browse files
changed sorting by last name, rather than first name @zmknox
parent
3f74a184
Changes
1
Hide whitespace changes
Inline
Side-by-side
srctweb/_pages/people.html
View file @
f0548e2e
...
...
@@ -43,7 +43,7 @@ tablesorter_css: true
<thead>
<tr>
<th
data-sorter=
"false"
></th>
<th><h4>
Name
</h4></th>
<th
class=
"sorter-last-name"
><h4>
Name
</h4></th>
<th
data-sorter=
"false"
><h4>
Email
</h4></th>
</tr>
</thead>
...
...
@@ -70,7 +70,7 @@ tablesorter_css: true
<thead>
<tr>
<th
data-sorter=
"false"
></th>
<th><h4>
Name
</h4></th>
<th
class=
"sorter-last-name"
><h4>
Name
</h4></th>
<th
data-sorter=
"false"
><h4>
Email
</h4></th>
</tr>
</thead>
...
...
@@ -92,6 +92,23 @@ tablesorter_css: true
<script
src=
"/assets/js/jquery.tablesorter.min.js"
type=
"text/javascript"
></script>
<script>
$
(
function
()
{
// from https://stackoverflow.com/questions/38209618/
// response there by the person who maintains the project
$
.
tablesorter
.
addParser
({
id
:
'
last-name
'
,
is
:
function
()
{
return
false
;
},
format
:
function
(
str
)
{
var
parts
=
(
str
||
''
).
split
(
/
\s
+/
),
last
=
parts
.
pop
();
parts
.
unshift
(
last
);
return
parts
.
join
(
'
'
);
},
// set type, either numeric or text
type
:
'
text
'
});
$
(
"
#devs-table
"
).
tablesorter
({
theme
:
"
bootstrap
"
,
sortList
:
[[
1
,
0
]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment