Giter Club home page Giter Club logo

Comments (5)

brianteeman avatar brianteeman commented on May 30, 2024

when the script was written it only addressed the tables used in the core and to the best of my knowledge none of those have tfooter or colspan. As the script is something that a developer has to include (its not automatic) probably no one saw this as a problem.

As you have a fix for the tfooter part then please submit a pull request with those changes.

from joomla-cms.

rogercreagh avatar rogercreagh commented on May 30, 2024

Thank you Brian. I don't actually have a working fix yet, so far I simply looked in the source to see what was going wrong - it looks like it should be straightforward - just repeat everything done for the header with the footer if it exists and has the same column count - there will, however, be a nasty case where the footer uses colspans (as I have seen done in some extensions and example code) which will have to do something different which might be quite tricky.

Personally I rarely (never) use colspans - generally I use the footer to repeat the header rows if the number of rows might be bigger than will fit on the screen, so there is always the same count of visible columns. (yes I know I could simply make the header row sticky which would be a better solution in this case)

So my solution would ignore this case, which would perhaps be bad for some people. I guess one could simply check for colspans in the footer - or in fact anywhere in the table, as colspans anywhere would likely break the,table.columns code - and simply disable the table.columns script if they were found. Would that be acceptable?

However now comes the rub, as I've been here before - I have never successfully submitted a pull request for Joomla as I have never been able to understand how to run the test required and I'm not about to change my personal quirky development routines in order to accommodate them - life is too short.

So I am not actually able to submit a pull request once I have it working anyway. I need someone who understands the way of the Joomla to take my code and sprinkle the secret magic testing dust over it. This has been my problem since I wrote my first module for J1.5 (I actually started with 1.0.11, and even briefly tried Mambo before that).

If anyone would like to take it on after I have my version working then that would be great. Since footers are never used in core tables I guess it wont matter to most people, and I'll simply bundle my corrected version of table.columns with my components as required. Same as happened with the bugs in string.truncate which have never been fixed in the core (and are still there in j5)

from joomla-cms.

rogercreagh avatar rogercreagh commented on May 30, 2024

I've also just noticed that it (table.columns) doesn't work if you are using <colgroup> to set column widths and styles. So that will need dealing with too.
Since this is the neatest way (for me) of setting which columns should show or hide on mobile and how the widths should be distributed and any whole column styles required then its a bit of a show-stopper for using table.columns.

from joomla-cms.

brianteeman avatar brianteeman commented on May 30, 2024

My gut feeling here is to say that this is a "wont fix"
It works perfectly with the core implementation of tables.
It has to be optionaly added by extensions if they want to use it
Even if someone made the pull request for you for your code you still would not use it as it doesnt address other non-core wierd cases.

Having said that if someone was to contribute the code that satisfies your need I would be happy to test it.

This is a Feature Request

from joomla-cms.

rogercreagh avatar rogercreagh commented on May 30, 2024

Yes I agree Brian. Leave as is and possibly look to add a note somewhere in the documentation that table.columns will not work with tables that have a <tfoot >, <colspan >, or ,<colgroup > elements.

For my own purposes I can adapt the code to work with what I use, and other extension devs can do the same. I'll post whatever I do and link to it here in case someone else stumbles across this problem and can make use of it.

I'll leave this open for now to make it easier for others to find. it needs to be tagged as a feature request not a bug

from joomla-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.