Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   DataTables кастомизация (https://javascript.ru/forum/jquery/26824-datatables-kastomizaciya.html)

S-Kerrigan 23.03.2012 17:29

DataTables кастомизация
 
Код:

<!DOCTYPE HTML>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <!-- Le styles & scrips-->
    <link href="../assets/css/bootstrap.css" rel="stylesheet">
        <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
        <script type="text/javascript" src="../assets/js/jquery.js"></script><!--Библиотека JavaScript-->
        <script type="text/javascript" src="../assets/js/FixedHeader.js"></script><!--Фиксация плашек таблицы-->
        <script type="text/javascript" src="../assets/js/jquery.dataTables.js"></script><!--Отображание самой таблицы-->
                <script type="text/javascript" charset="utf-8">
                        $(document).ready( function () {
                                var oTable = $('#example').dataTable( {
                                        "sDom": '<"top">rt<"tfoot"flpi><"clear">',
                                        "iDisplayLength": -1,
                                        "bFilter": true,
                                        "bInfo": true,
                                        "bPaginate": true,
                                        "bLengthChange": true,
                                        "fnDrawCallback": function ( oSettings ) {
                                                for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ )
                                                {
                                                        $('td:eq(0), td:eq(6)', oSettings.aoData[ oSettings.aiDisplay[i] ].nTr ).html( i+1 );
                                                }
                                        },
                                        "aoColumns": [
                                                {"bSortable": false, "sWidth": "20px" },
                                                null, null, null, null, null,
                                                {"bSortable": false, "sWidth": "20px" }
                                        ]
                                } );
                                new FixedHeader( oTable, { "left": false, "right": false, "bottom": true } );
                        } );
                </script>
  </head>
  <body>
            <div class="container">
                <table cellpadding="0" cellspacing="0" border="0" id="example" class="table table-striped">
                        <thead valign="bottom">
                                <tr>
                                        <th></th>
                                        <th>Rendering engine</th>
                                        <th>Browser</th>
                                        <th>Platform(s)</th>
                                        <th>Engine version</th>
                                        <th>CSS grade</th>
                                        <th></th>
                                </tr>
                        </thead>
                        <tbody>
                        ...........
                        </tbody>
                        <tfoot>
                                <tr>
                                      <th></th>
                                </tr>
                        </tfoot>
              </div>
  </body>
</html>

Имею две горизонтальные плашки всегда на виду (thead & tfoot).
Вопрос: как в данном плагине можно указать куда будет отображаться фильтр таблицы (мне надо его запихнуть в "tfoot")? Указание места появления фильтра задается в самом jquery.dataTables.js и я там запутался. Буду рад любой помощи)


Часовой пояс GMT +3, время: 16:43.