Subversion-Projekte lars-tiefland.zeldi.de_alt

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
/**
2
 * Redraw the table (i.e. `fnDraw`) to take account of sorting and filtering,
3
 * but retain the current pagination settings.
4
 *
5
 * DataTables 1.10+ provide the `dt-api draw()` method which has this ability
6
 * built-in (pass the first parameter to the function as `false`). As such this
7
 * method is marked deprecated, but is available for use with legacy version of
8
 * DataTables. Please use the new API if you are used DataTables 1.10 or newer.
9
 *
10
 *  @name fnStandingRedraw
11
 *  @summary Redraw the table without altering the paging
12
 *  @author Jonathan Hoguet
13
 *  @deprecated
14
 *
15
 *  @example
16
 *    $(document).ready(function() {
17
 *        var table = $('.dataTable').dataTable()
18
 *        table.fnStandingRedraw();
19
 *    } );
20
 */
21
 
22
jQuery.fn.dataTableExt.oApi.fnStandingRedraw = function(oSettings) {
23
    if(oSettings.oFeatures.bServerSide === false){
24
        var before = oSettings._iDisplayStart;
25
 
26
        oSettings.oApi._fnReDraw(oSettings);
27
 
28
        // iDisplayStart has been reset to zero - so lets change it back
29
        oSettings._iDisplayStart = before;
30
        oSettings.oApi._fnCalculateEnd(oSettings);
31
    }
32
 
33
    // draw the 'current' page
34
    oSettings.oApi._fnDraw(oSettings);
35
};