Merge "Floating IP table should support sorting"
This commit is contained in:
commit
699e423010
@ -307,6 +307,10 @@ $.tablesorter.addParser({
|
||||
// innertext smashed together with no delimiters, so we need to find
|
||||
// the original cell and grab its first element to do the work
|
||||
var a = $(cell).find('li').first().text().split('.');
|
||||
// if the cell doesn't contains the list, try to get the text directly
|
||||
if (a === "") {
|
||||
a = $(cell).text().split('.');
|
||||
}
|
||||
if (a.length !== 4) {
|
||||
return false;
|
||||
}
|
||||
@ -323,6 +327,10 @@ $.tablesorter.addParser({
|
||||
format: function(s, table, cell) {
|
||||
var result = 0;
|
||||
var a = $(cell).find('li').first().text().split('.');
|
||||
// if the cell doesn't contains the list, try to get the text directly
|
||||
if (a === "") {
|
||||
a = $(cell).text().split('.');
|
||||
}
|
||||
var last_index = a.length - 1;
|
||||
// inet_aton(3), Javascript-style. The unsigned-right-shift operation is
|
||||
// needed to keep the result from flipping over to negative when suitably
|
||||
|
Loading…
Reference in New Issue
Block a user