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.

  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.

Comments

rjerome’s picture

You are right on that and if you come up with a solution I'll be happy to include it :-)

scottrigby’s picture

Status: Needs review » Active
StatusFileSize
new806 bytes

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;
}
scottrigby’s picture

Status: Active » Needs review
StatusFileSize
new1.27 KB

Oops, diffed the wrong file. Real patch attached =)

scottrigby’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

Just noticed if ($tid) { needs the same treatment (when viewing /admin/settings/biblio/fields/type/edit/N). Updated patch again

scottrigby’s picture

StatusFileSize
new1.45 KB

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

liam morland’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.