
        function TestTable1() {
            $('#datatable-1').on('xhr.dt', function (e, settings, json) {
                if (typeof (json.data) == 'object' && json.data.length >0) {
                    var dateKey = false, key, date;
                    var possibleDateKeys = ['readed'];
                    for (var num in possibleDateKeys) {
                        key = possibleDateKeys[num];
                        if (typeof(json.data[0][key]) != 'undefined') {
                            dateKey = key;
                        }
                    }
                    if (dateKey) {
                        for (var i in json.data) {
                            date = json.data[i][dateKey];
                            if (date > 0) {
                                date = new Date(date * 1000);
                                json.data[i][dateKey] = date.toLocaleFormat("%b %d, %Y %H:%M");
                            }
                        }
                    }
                }
            }).dataTable({
                "processing": true,
                "serverSide": true,
                "ajax": {
                    "url": "{{ app.request_context.baseUrl }}/{{ app.controller_alias }}/stat-abonents-list-json",
                    "data": function (d) {
                        d = dataTableDataPrepare(d);

                        $('input[id^="datepicker_"]').each(function () {
                            d['filters[' + $(this).attr("id").replace("datepicker_", "interval_") + ']'] = $(this).val();
                        });
                    }
                },
                "language": {
                    "url": "{{ app.datatable_lang_file }}"
                },
                {% if attribute(app, 'dropdownAttribute') is defined %}
                {{ main_macro.get_datatable_column(app['dropdownAttribute']) }}
                {% endif %}
                "bFilter": true,
                "bPaginate": true,
                "lengthChange": true,
                "bInfo": true,
                
                "fixedHeader": {
                    header: true,
                    headerOffset: $('header.navbar').height()
                },
                
				"columnDefs": [{"searchable": false, "targets": [2]}]
            });
        }

        function yelp() {
            $(document).ready(function () {
                {{ main_macro.get_datepicker_js_script() }}
                LoadDataTablesScripts(TestTable1);
            });
        }

        document.addEventListener("DOMContentLoaded", yelp, false);
