Update translations
This commit is contained in:
@ -604,6 +604,13 @@
|
||||
dir = "asc";
|
||||
/* Make a loop that will continue until
|
||||
no switching has been done: */
|
||||
|
||||
// Normal sorting is done on text based.
|
||||
mode = 'text';
|
||||
if ([1,4,5].indexOf(n) !== -1) {
|
||||
// but for some colums, we want to use number soring.
|
||||
mode = 'number';
|
||||
}
|
||||
while (switching) {
|
||||
// Start by saying: no switching is done:
|
||||
switching = false;
|
||||
@ -621,14 +628,21 @@
|
||||
based on the direction, asc or desc: */
|
||||
var value_x = jQuery(x).find('select').length > 0 ? jQuery(x).find('select') : jQuery(x).find('input');
|
||||
var value_y = jQuery(y).find('select').length > 0 ? jQuery(y).find('select') : jQuery(y).find('input');
|
||||
|
||||
if (dir == "asc") {
|
||||
if (value_x.val().toLowerCase() > value_y.val().toLowerCase()) {
|
||||
if (
|
||||
('text' == mode && value_x.val().toLowerCase() > value_y.val().toLowerCase()) ||
|
||||
('number' == mode && (value_x.val() * 1) > (value_y.val() * 1))
|
||||
) {
|
||||
// If so, mark as a switch and break the loop:
|
||||
shouldSwitch = true;
|
||||
break;
|
||||
}
|
||||
} else if (dir == "desc") {
|
||||
if (value_x.val().toLowerCase() < value_y.val().toLowerCase()) {
|
||||
if (
|
||||
('text' == mode && value_x.val().toLowerCase() < value_y.val().toLowerCase()) ||
|
||||
('number' == mode && (value_x.val() * 1) < (value_y.val() * 1))
|
||||
) {
|
||||
// If so, mark as a switch and break the loop:
|
||||
shouldSwitch = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user