• Resolved infamousstudios

    (@infamousstudios)


    First time using Tablepress. Just installed and added a few tables to a new site we’re building. The formatting of the columns is messed up and I can’t figure out how to fix it. Basically the columns dont line up with the table header columns.

    You can view the page in question at: http://www.threestarracing.com/?product=sct-sf3-power-flash-3015

    The first table has more than 10 entries… and if you click next to view 11-20 it fixes the formatting problem for that table. However, upon page load it is displayed incorrectly. Along with the other two tables who do not have more than 10 entries, are also displayed in correctly. They all have horizontal scrolling on. I did add .tablepress td { white-space: nowrap; } to the Custom CSS for the plugin.

    Any help will be appreciated.
    Thank you,
    J

    http://wordpress.org/extend/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, this is a very annoying problem, and unfortunately, I don’t really know a reason or solution to this 🙁 I have seen this before a few times, but all that we found was that this is somehow connected to the calculation of the widths of the head row.

    Your best chance to find a fix for this, might be to ask again in the forums of the DataTables JavaScript library (which is the external JS library that TablePress uses for this feature) at http://www.datatables.net/forums

    I can imagine that the DataTables developer might know a solution, and if you find one, please let me know! I’ll then gladly add it to TablePress!

    Thanks!
    Tobias

    Thread Starter infamousstudios

    (@infamousstudios)

    Hi Tobias,

    I got a response from the forums over at datatables.net… this is what they said:

    >>>
    The issue is that the table has no width when it is initialised since it is initialised hidden. You need to call fnAdjustColumnSizing when it is made visible.

    See also this example: http://datatables.net/release-datatables/examples/api/tabs_and_scrolling.html
    <<<

    Does that help with figuring this out?

    Thank you again in advance for your help,
    Jon

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jon,

    thanks for asking about this in the DataTables forums! Good to hear that they had an answer.

    However, this is not really something that I can add/change in TablePress. The mentioned JS function (to re-calculate the width of the table) would have to be executed each time a new tab is opened. Thus, this would have to be added to the JavaScript code of the tabbing mechanism somehow…

    Regards,
    Tobias

    Thread Starter infamousstudios

    (@infamousstudios)

    Hi Tobias,

    I would be happy to donate, or pay for this to be added. If it’s something you could add or would be willing too. If you cannot, do you have any suggestion on requesting this type of work from someone?

    Thank you in advance,
    Jon

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jon,

    I can’t promise a solution here, as this would have to be changed in the Tabs solution that you are using, and not in TablePress.
    So, the first step would be to find out where the Tabs function comes from: Is this a plugin, or maybe part of your theme?

    Regards,
    Tobias

    Thread Starter infamousstudios

    (@infamousstudios)

    Hi Tobias,

    The Tabs solution is from Woothemes: http://www.woothemes.com/products/woocommerce-tab-manager/

    If you would like to see the php that goes with the plugin, let me know and i can email it to you?

    Jon

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jon,

    good to hear that you found this.

    Now, I’d like to help further with this, but my resources and time are just too limited right now, as that I could provide support for such external commercial plugins. I’m really sorry, but I hope for your understanding.
    My suggestion is to ask the WooCommerce support for a way to extend the JavaScript code of the plugin. You could then add the code that you got from the DataTables forums to that.

    Regards,
    Tobias

    Thread Starter infamousstudios

    (@infamousstudios)

    Ok, thank you. I will ask them for some assistance.

    I appreciate your time, and understand you are too busy.

    Have a good week,
    Jon

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Jon,

    yes, that’s going to be the best way forward.
    If you find that something needs to be changed in TablePress, just post again and I’ll take a look.

    Regards,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Column Formatting Issue’ is closed to new replies.