MAJOR BUG (ColReorder) *UPDATED ColReorderWithResize.js inside*

MAJOR BUG (ColReorder) *UPDATED ColReorderWithResize.js inside*

AlltorAlltor Posts: 7Questions: 0Answers: 0
edited August 2015 in Bug reports
I'M POSTING THIS BECAUSE IT AFFECTS EVERY SINGLE ONE OF YOUR CUSTOMERS.

When you go to ANY ColReorder example page, take this one:
http://datatables.net/release-datatables/extras/ColReorder/index.html

When you move a column and then click on the new column to sort it, it sorts the column it was in before instead of the new one.
When you do this a couple times with other columns you can see the bug getting worse..

So, any fixes?

---------------------
SIDE BUG(S):

Table Tools doesn't work when you're using both one of your skins and ColReorder.

Replies

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    > So, any fixes?

    Yes - use the 1.0.7.dev version of ColReorder: http://datatables.net/download/ . I'll be packaging up a new release soon.

    Allan
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    In fact, I've just packages up the 1.0.7 ColReorder release. The examples on this site aren't yet up-to-date, since they are the examples from the 1.9.3 DataTables release - but 1.9.4 will be out soon with these changes. In the mean time the ColReorder 1.0.7 package can be downloaded from the downloads page.

    Allan
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited September 2012
    *See below*
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited August 2015
    Thanks Allan. Since I want to benefit ALL of your customers, including myself I went ahead and made several changes to update the Third party plug-in "ColReorder with resizing" to v1.0.7 from this page http://datatables.net/extras/ with your new code. If you like, you can credit me on the Third party plug-in page as well and upload the new version. Since you're probably going to add new stuff to your own version 1.0.7 I guess you can rename mine to something other than ColReorderWithResize 1.0.7 so as not to mess up your version chronology.

    Here is the new updated version of ColReorder with resizing: [retracted]

    You can see it in action on my page here: [retracted]

    btw, in one of the sections I combined your code from line 277 of 1.0.7 with line 292 of ColReorderWithResize 1.0.5 in my new version of ColReorderWithResize 1.0.7 below:
    [code]
    /*
    * Any extra operations for the other plug-ins
    */
    if ( typeof ColVis != 'undefined' )
    {
    ColVis.fnRebuild( oSettings.oInstance );
    }

    /* Fire an event so other plug-ins can update */
    $(oSettings.oInstance).trigger( 'column-reorder', [ oSettings, {
    "iFrom": iFrom,
    "iTo": iTo,
    "aiInvertMapping": aiInvertMapping
    } ] );
    [/code]

    If you plan on fixing the following later let me know:
    [quote]Will you be making FixedHeader compatible with the skins or is that out of the question? And can you make TableTools compatible with ColReorder/ColReorderWithResize when using a skin? Thanks once again.[/quote]
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    Thanks for updating the resizing extra. I've just updated the source file on this site.

    Does FixedHeader not work with jQuery UI ThemeRoller already (which is what I presume you mean by skins)? Also TableTools should be fully compatible with ThemeRoller already.

    Allan
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited August 2015
    Hey Allan you're very welcome. Glad to be able to contribute to your site, your members and your product! Here's my code, I put everything in there I believe. It should work but maybe it's because I'm using jQuery 1.7.2? I did notice I have to change the (#) to (jQuery) to get the table to work properly. And as for FixedHeader, simply adding the FixedHeader.js breaks my code. Hmm.. what do you think? I didn't see a UI demo on the FixedHeader examples page either http://datatables.net/extras/fixedheader/examples

    I have the code below running here if you want to try clicking on the buttons and seeing that they don't work: [retracted]

    I put it in an image because Vanilla keeps flagging it I guess because of the js code but you can access it using Ctrl+U on the page above in Firefox. [Retracted]
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    edited August 2015
    Hi,

    > I have the code below running here if you want to try clicking on the buttons and seeing that they don't work: [retracted]

    If you have a look at the console in your browser, or your server error log, you'll see the SWF file is failing to load. You might need to specify the sSwfPath parameter to point to where the file actually is.

    Allan
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited September 2012
    Allan you truly were sent from Heaven, no other way to describe you!!! That fixed it buddy!! Man, are you good or what!!

    How did you look at the "console", is that built in--or where did you see the server error log? This would help me a lot! Thanks once again!

    And one small question, how do you minify your js files? I'd like to minify some codes I have in js and if there's anyone who knows what to do it'd be you!

    This was a perfect example of how Karma works, we help one another, we help ourselves, we help all! You rock man, I'm going to give you a really special credit on the front page once I'm all done with the site. And once my registrations start rolling in, you will be sure to get a very special weekly donation :-)!
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    > How did you look at the "console", is that built in--or where did you see the server error log?

    I knew it would be in the error error log from experience (your server error log is not exposed publicly - that would be bad!).

    To get the console - if you are using Chrome:
    View > Developer > Javascript console

    Firefox:
    Open Firebug (install Firebug if not already installed and then click the Firebug icon)

    Other browsers have options (DragonFly in Opera, Inspector in Safari, Dev Tools in IE etc as well).

    > And one small question, how do you minify your js files?

    I use Closure Compiler for the DataTables files:
    https://developers.google.com/closure/compiler/

    There are loads of other options out there as well: YUI compiler, UglifyJS, JSmin etc, but I like the compression and options Closure compiler gives.

    Allan (karma satisfied :-) )
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited August 2015
    Allan thanks so much! Just one last important question:

    Do you know if there's something I'm missing to get FixedHeader working on my page correctly? Right now it just doubles the header which doesn't move when I use ColReorder: [retracted]

    And I don't see any errors with Firebug. Thanks.
  • AlltorAlltor Posts: 7Questions: 0Answers: 0
    edited September 2012
    *double post* sorry hey Allan I know you're working hard, hopefully FixedHeader will be fixed next release? Thanks so much!
  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin
    Sorry for the long delay.

    FixedHeader and ColReorder should play nicely together: http://datatables.net/release-datatables/extras/ColReorder/fixedheader.html

    Allan
This discussion has been closed.