ColReorderWithResize don't ellipse text

ColReorderWithResize don't ellipse text

oscaroxyoscaroxy Posts: 9Questions: 0Answers: 0

I have ColReorderWithResize and it is awesome, but I need a update, because it work fine only if I enlarge the column, but when I restrict the column and the column has the text long, the size of the column don't restrict than the length of the text.
sorry for my bad english...

I would to do same thing like this: http://www.visailing.com/include/tablesorter/docs/example-widget-resizable.html

that is, when I restrict the column and the text is more big then the text ellipse with dots.
can you help me?

Replies

  • colincolin Posts: 3,113Questions: 0Answers: 538

    Hi @oscaroxy ,

    ColReorderWithResize is a third party plugin, so it would be worth speaking to the developer.

    On that page above, there are events being fired, so you could potentially listen to those and redraw the ellipses based on the new width - but sorry, one for the plugin's author.

    Cheers,

    Colin

  • oscaroxyoscaroxy Posts: 9Questions: 0Answers: 0

    thanks for the reply, but in author's site there is written of to write to datatables forum.
    I'll follow your advice, thank you

  • oscaroxyoscaroxy Posts: 9Questions: 0Answers: 0

    I tried a solution: replace into "https://github.com/jeffreydwalter/ColReorderWithResize/blob/master/ColReorderWithResize.js" the rows from 1200 to 1225 with:

    $scrollBody.closest('.dataTables_scroll').find('table th:nth-child('+visibleColumnIndex+')').each(function(){
    $(this).css('width',nThWidth+'px');
    $(this).css('min-width',nThWidth+'px');
    $(this).css('max-width',nThWidth+'px');
    });

    $scrollBody.closest('.dataTables_scroll').find('table td:nth-child('+visibleColumnIndex+')').each(function(){
    $(this).css('width',nThWidth+'px');
    $(this).css('min-width',nThWidth+'px');
    $(this).css('max-width',nThWidth+'px');
    });

  • oscaroxyoscaroxy Posts: 9Questions: 0Answers: 0
    edited October 15

    I done another solution and it's better, it work fine, but I don't beleave that is the better solution for the performance. So if you can help me, we could improve the plugin.
    thanks

    ps. I updated this post, I added ColReorderWithResize2.txt, so you look the second attach

Sign In or Register to comment.