Weight isn't hidden @ admin/settings/biblio/fields
scottrigby - May 26, 2009 - 16:08
| Project: | Bibliography Module |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I see the problem but not exactly sure how to solve it.
In theme_biblio_admin_types_edit_form() (biblio_theme.inc line 748) the drupal_add_tabledrag function is given hidden=false.
<?php
drupal_add_tabledrag('field-table', 'order', 'sibling', 'weight',NULL,NULL,false);
?>It looks like the reason is because this was hiding the Autocomplete column rather than the weight column -- I assume because of the way the hint / auth_type colspan is set up.
I didn't see an issue for this so mainly just creating one to track it. I haven't ever dealt with this (hiding weight with a draggable table using colspans) so don't have a solution to propose yet.

#1
You are right on that and if you come up with a solution I'll be happy to include it :-)
#2
Hi rjerome,
Yeah, I'm not sure if there is some undocumented (or obscure) way to solve this, or if it really is a bug in drupal_add_tabledrag() or what --
I thought for a moment that the issue was we needed to add a colspan to the header cell too, but I did that & the problem still persisted (I kept that change cause it looks better anyway though it doesn't solve our problem).
So as a workaround I temporarily used Drupal's js-hide class, from modules/system/system.css, which from the css comments seems to be a not-too-inelegant way to do it, since it wil degrade gracefully if a user doesn't have js enabled in their browser.
Another patch attached...Edit: see real patch in #3 below - can't seem to remove attachments when editing comments - oh well. This method works well for me./*** For anything you want to hide on page load when JS is enabled, so
** that you can use the JS to control visibility and avoid flicker.
*/
html.js .js-hide {
display: none;
}
#3
Oops, diffed the wrong file. Real patch attached =)
#4
Just noticed
<?phpif ($tid) {
?>
#5
Ok, embarrassingly I mis-named this patch (same number as one I made for a separate issue). This one is the same as the last patch, but now the number matches the d.o issue number - changing mainly to help keep track. 'pologies for any confusion Ron :p