Comments (5)
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.
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.
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.
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.
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)
- [5.2] Usability: Media Manager - Allow SVG images HOT 1
- [5.2] Usability: add Versioning to Menu Item edit
- [5.2] Usability: Media Manager > edit image > contain instead of cover (think of vertical images) HOT 1
- [5.2] New code feature: Add new Plugin Event in Models in methods PopulateState / getItems
- [5.2] Usability: Media Manager - tick checkbox of newly uploaded Media HOT 1
- [5.2] Usability: Media Manager - Move image to other folder HOT 2
- [5.1] Problem: Menu items with "compact list of tagged items" don't work HOT 3
- [5.2] Usability: Media Manager > Save and new
- [5.1] Problem: Menu items with Item Selection Options doesn't work HOT 3
- 4.4.5 : update gives checksum error HOT 1
- [5.1] Non-Cassiopeia front-end editor is told 'you have been logged out' after clicking media button
- multiselect.js issue with unwanted selections HOT 6
- table.columns breaks if tfoot or colgroup are used in the table HOT 4
- Unable to install languages HOT 3
- Joomla accessibility checker in frontend HOT 5
- Related Article Module sort articles HOT 3
- com_finder not found HOT 1
- Plugin for vote article! HOT 3
- [5.1.1] Do not open archived articles via a direct link HOT 2
- /media/com_media/js/media-manager.js mixed line endings LF CR/LF HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joomla-cms.