-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kalatheme _table hook overwrites tablefield header classes #300
Comments
@break9 The first couple of lines of that function are checking if any classes are being passed in and using them if they are there or setting a new array if they're not. In what way does this over write what table field is doing? If table field is adding classes in a preprocess then they should just come in and get added here. |
Tablefield or more precisely, drupal function theme_table (sticky-header), turns the table into 2 tables including one that is the sticky header (this table contains only the header rows that will become "sticky" and is hidden at the top of the page waiting to be set to visible once the table header is scrolled beyond top:21 It looks like none of that pre-processing done by tablefield makes it to the rendered output if Kalatheme or more specifically, the kalatheme_table function, is called. if you remove the kalatheme_table hook, then the table is rendered as expected. rendered output without kalathem_table:
rendered table with kalatheme_table:
|
It looks like you are overwriting the drupal theme_table function completely but you haven't included the code to handle sticky headers. I copied this code from the drupal theme_table function and pasted into the kaltheme_table function at line 24 to fix the issue. Does this sound correct?
|
@break9 Have you tested this out? Does it seem to hold together? No broken JS? Feel free to fire up a pull request and I will pull it down and test it. |
No issues so far.
|
@soniktrooth no idea, might have been before bootstrap had sticky functionality |
tried to push to a new branch but i am getting a permissions error |
jesus christ @break9! |
Sup @pirog !!! @soniktrooth done |
the core.inc file line 11
function kalatheme_table($variables) {
... function overwrites the classes added by the tablefield module.this means the table header rows aren't sticky. I am not sure if this is by design but it was pretty difficult to track down.
I am assuming I need to write a custom hook to re-insert the table-sticky classes, or am I missing something?
The text was updated successfully, but these errors were encountered: