Editor and jQuery 1.9.* support

Editor and jQuery 1.9.* support

komserbeykomserbey Posts: 25Questions: 0Answers: 0
edited March 2013 in Editor
Dear,

Editor is not working With jQuery 1.9.*
Is there support for it?

Regards,

K

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Hi,

    Editor should indeed fully support jQuery 1.9. However, what might be tripping your script up is TableTools, which has only recently become fully compatible with jQuery 1.9. Can you confirm which version of TableTools you are using please? If not 2.1.5, please upgrade using the package on the download page here: http://datatables.net/download/ (note Editor currently ships with 2.1.4 due to the packaging, so it might be this that is causing the problem).

    Regards,
    Allan
  • komserbeykomserbey Posts: 25Questions: 0Answers: 0
    Hi Allan,

    I have the last version of Datatables and Editor. The problem is that the header is smaller than the body.

    I looked at http://www.datatables.net/examples/api/tabs_and_scrolling.html
    But that is not working.

    Please help me.

    Regards,

    K
  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Can you link to the page you are working on so I can see what is wrong with it? Does it work with jQuery < 1.9? Can you run your page through the DataTables debugger as well please: http://debug.datatables.net .

    Thanks,
    Allan
  • komserbeykomserbey Posts: 25Questions: 0Answers: 0
    Dear Allan,

    I send you a PM with the URL and login information.
    The problem also occurred in jQuery versions earlier than 1.9

    Thank you.

    Regards,

    K
  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Thank you for the log in. So the problem is exactly that described in the example you linked to: http://www.datatables.net/examples/api/tabs_and_scrolling.html . Specifically that you are using jQuery UI tabs and that it is the second tab, the one not visible by default, which has miss-alignment in the columns. This is for the reasons detailed in the example - specifically that the hidden elements don't have height / width so can't be sized correctly.

    You must add a call to fnAdjustColumnSizing when your tab is made visible. Something like:

    [code]
    $("#tabs").tabs( {
    "show": function(event, ui) {
    var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
    if ( oTable.length > 0 ) {
    oTable.fnAdjustColumnSizing();
    }
    }
    } );
    [/code]

    Allan
  • komserbeykomserbey Posts: 25Questions: 0Answers: 0
    Hello Allan,

    Thanks for your comment. The problem is as next:

    The show in [code]"show": function(event, ui) {[/code] is not working in jQuery UI 1.10.*
    I used the activate:

    [code]
    $(document).ready(function() {
    $( "#tabs" ).tabs({
    activate: function(event, ui) {
    var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
    if ( oTable.length > 0 ) {
    oTable.fnAdjustColumnSizing();
    }
    }
    });
    });
    [/code]

    And everything is working with the latest jQuery and jQuery UI.

    Thank you!
This discussion has been closed.