It doesn't require to specify all columns in "Columns settings" parameters section. By default "text sorting type is used for all columns.
About using , instead . symbol, it requires to modify <joomla_directory>/modules/mod_aridatatables/includes/js/widgets/datatable/js/jquery.dataTables.extra.js file. Replace the following code:
Code: |
jQuery.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) {
var x = a.replace(/[^-.0-9]/g, "");
var y = b.replace(/[^-.0-9]/g, "");
x = parseFloat( x );
y = parseFloat( y );
if (isNaN(x))
x = Number.MAX_VALUE;
if (isNaN(y))
y = Number.MAX_VALUE;
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
jQuery.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) {
var x = a.replace(/[^-.0-9]/g, "");
var y = b.replace(/[^-.0-9]/g, "");
x = parseFloat( x );
y = parseFloat( y );
if (isNaN(x))
x = Number.MIN_VALUE;
if (isNaN(y))
y = Number.MIN_VALUE;
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
|
with the following one:
Code: |
jQuery.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) {
var x = a.replace(/,/g,'.').replace(/[^-.0-9]/g, "");
var y = b.replace(/,/g,'.').replace(/[^-.0-9]/g, "");
x = parseFloat( x );
y = parseFloat( y );
if (isNaN(x))
x = Number.MAX_VALUE;
if (isNaN(y))
y = Number.MAX_VALUE;
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
jQuery.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) {
var x = a.replace(/,/g,'.').replace(/[^-.0-9]/g, "");
var y = b.replace(/,/g,'.').replace(/[^-.0-9]/g, "");
x = parseFloat( x );
y = parseFloat( y );
if (isNaN(x))
x = Number.MIN_VALUE;
if (isNaN(y))
y = Number.MIN_VALUE;
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
|
and clean browser's cache.
Regards,
ARI Soft