Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting language url on datatables breaks functionality #270

Closed
mallorca2288 opened this issue Dec 14, 2015 · 3 comments
Closed

Setting language url on datatables breaks functionality #270

mallorca2288 opened this issue Dec 14, 2015 · 3 comments
Labels

Comments

@mallorca2288
Copy link

Whenever I try to translate the datatables strings using a json file the filters of yadcf are disabled.

When I load the page the filters show up, but when the page finishes loading they dissapear.

DataTables version: 1.10.10
yadcf version: 0.8.8

Current code (doesn't work):

$('#stock_table').dataTable( {
            "paginate": false,
            "dom": '<"#category">lfrt',
            "language": {
                "url": "/includes/datatables/Spanish.json"
            },
            "columnDefs": [
                {
                    "targets": [ 1, 2, 3, 4 ],
                    "searchable": false,
                    "orderable": false,
                    "className": "centrado"
                }
            ]
        }).yadcf([
            {
                column_number: 0,
                filter_type: "auto_complete"
            },
            {
                column_number: 1,
                column_data_type: "html",
                html_data_type: "text",
                filter_default_label: "Seleccionar categoría"
            }
        ]);

But deleting the language option on datatables makes it work:

$('#stock_table').dataTable( {
            "paginate": false,
            "dom": '<"#category">lfrt',
            "columnDefs": [
                {
                    "targets": [ 1, 2, 3, 4 ],
                    "searchable": false,
                    "orderable": false,
                    "className": "centrado"
                }
            ]
        }).yadcf([
            {
                column_number: 0,
                filter_type: "auto_complete"
            },
            {
                column_number: 1,
                column_data_type: "html",
                html_data_type: "text",
                filter_default_label: "Seleccionar categoría"
            }
        ]);

Sorry for my english.
Greetings from Spain!

@vedmack
Copy link
Owner

vedmack commented Dec 14, 2015

Please provide a link to a jsbin/jsfiddle with the language issue, otherwise I wont be able to reproduce/debug it

@mallorca2288
Copy link
Author

vedmack added a commit that referenced this issue Dec 14, 2015
@vedmack vedmack added the bug label Dec 14, 2015
@vedmack
Copy link
Owner

vedmack commented Dec 14, 2015

fixe, grab the 0.8.9.beta.29
see working sample

as to the autocomplete filter you must include jquery ui autocomplete js/css in order for it to work

@vedmack vedmack closed this as completed Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants