vendredi 24 juillet 2015

Use best_in_place gem with DataTables using serverside serving

I've used the app before however when trying to integrate it with the server side Datatables instead of client side, it breaks. I tried things such as:

 x = $('#results_steam').DataTable({
                        serverSide: true,
                        "ajax":{"url": "/analysis/visitanks/2/history_data.json?<%= request.url.split('?').last %>", "type": "POST"},
                        "bPaginate": true,
                        "bInfo": false,
                        "bFilter": false,
                        "sScrollX": "100%",
                        "sScrollXInner": "100%",
                        "iDisplayLength": 25,
                        "bScrollCollapse": true,
                        "bAutoWidth": false,
                        "aoColumns" : [
                            { sWidth: '100px' },
                            { sWidth: '100px' },
                            { sWidth: '100px' },
                            { sWidth: '100px' },
                            { sWidth: '100px', data: <%=best_in_place @refill, :ticket, as: :input, :url => ionit_tank_refill_path(@refill.id)%> },
                            { sWidth: '100px'},

                        ]
                    }
            );

Any tips would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire