DataTables FixedHeader and Language - Bug?

DataTables FixedHeader and Language - Bug?

mramalhomramalho Posts: 1Questions: 1Answers: 0
edited August 2014 in Free community support

Hi,

I believe I found a bug in DataTables. I didn't find any issues until I started using the FixedHeader extension. Basically, everything was working well until I added the last line of the code below:

T2S.dataTableInitialSettings = {
    //          "bJQueryUI": true,
    "stateSave": true,
    "stateDuration": -1,
    "language": {
        "url": localizationUrl
    },
    "order": [[defaultOrderedColumnIndex, "asc"]],
    "sPaginationType": "input",
    "sDom": 'T<"clear">lfrtip',
    "tableTools": {
        "sSwfPath": tableToolsSwfUrl,
        "aButtons": [
                    "copy",
                    {
                        "sExtends": "xls",
                        "bFooter": false,
                        "sTitle": "Lista_DCA_" + new Date().toDateString()
                    },
                    {
                        "sExtends": "pdf",
                        "bFooter": false,
                        "sPdfOrientation": "landscape",
                        "sTitle": "Lista_DCA_" + new Date().toDateString()
                    },
                    {
                        "sExtends": "print",
                        "sInfo": "<h6>Vista para Impressão</h6>Imprima através do browser<br />e carregue na tecla \"Esc\" para sair.",
                        "sToolTip": "",
                        "sButtonText": "Imprimir"
                        //                        "fnInit": function (node) { formatTableToolsButton(node, 'ui-icon-print'); }
                    }
                ]
    }
};

var table = $("#" + tableElementId).DataTable(T2S.dataTableInitialSettings);
new $.fn.dataTable.FixedHeader(table);

If I try to localize the table using a URL (that points to a JSON file) and useFixedHeader as well, I am no longer able to sort data, i.e., clicking on the table header has no effect. However, if I don't use the "url" option and write down the translations directly, it works. Is this a bug?

Thanks.

This discussion has been closed.