1.7.0 beta 3 removes strip classes from all tables in the document

1.7.0 beta 3 removes strip classes from all tables in the document

csaba.juhoscsaba.juhos Posts: 2Questions: 0Answers: 0
edited July 2010 in General
The strip classes are removed from all tables, not just the target table. For example:
[code]
$(function(){
$("table#target").dataTable();
});
[/code]
removes the "odd" and "even" classes not only from the table with the id "target", but from all tables.
Which is certainly not ok, if you want to mix DataTable and plain tables.

Where can I upload a patch?

Csabi

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Csabi,

    That is most certainly wrong! There is a small change due in beta 4, but I don't think there is anything which effects this. I can't actually see what is causing it at a quick glance - so a patch to help my understanding would be very welcome indeed. You can either paste it in here, or send it to me: http://datatables.net/contact

    Regards,
    Allan
  • csaba.juhoscsaba.juhos Posts: 2Questions: 0Answers: 0
    Hi Allan,

    Sorry for the late reply. Here's the patch:

    diff -ru dataTables-1.7.orig/media/js/jquery.dataTables.js dataTables-1.7/media/js/jquery.dataTables.js
    --- dataTables-1.7.orig/media/js/jquery.dataTables.js 2010-06-12 19:38:11.000000000 +0300
    +++ dataTables-1.7/media/js/jquery.dataTables.js 2010-07-06 13:29:24.000000000 +0300
    @@ -5987,7 +5987,7 @@

    if ( bStripeRemove )
    {
    - $('tbody>tr').removeClass( oSettings.asStripClasses.join(' ') );
    + $('tbody>tr', this).removeClass( oSettings.asStripClasses.join(' ') );
    }

    /*

    Regards,
    Csabi
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Csabi,

    Thanks very much for the patch! I believe that the change I've made for beta 4 will catch this - but I will make sure, and incorporate your change, later on.

    Regards,
    Allan
This discussion has been closed.