I'm trying to make a draggable view and as the view load you can see the weights appear and then the whole column where the draggable handles should be disappears.

The html displayed for the table cell looks like this:

So the display: none is being applied to the td and not to the form-item where it would have the correct effect.

Comments

asciikewl’s picture

Hmmm, lets try that html code again, this time in code tags :)

<td class="views-field views-field-weight" style="display: none;">
<a class="tabledrag-handle" href="#" title="Drag to re-order">
<div class="handle"> </div>
</a>
<div class="form-item">
<select id="edit-rows-0-weight" class="form-select weight_dragger" name="rows[0][weight]">
</select>
</div>
</td>
nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

Which browser are you using? Have you tried more than one? Which theme? If not a core theme, have you tried one?

asciikewl’s picture

Browser: Firefox 3 and Safari 3.2

Theme: Both a custom theme and Garland.

I haven't tried other views, will give that a shot and see if I can pinpoint the problem more exactly. Where is the js that actually hides the elements? That might help me track down the issue.

nancydru’s picture

I would assume that the js is somewhere in the Views folder.

omniverse’s picture

I'm having the same problem. Reproduced it in FF and Safari.

The weight dropdowns appear at first, then the javascript kicks in and they dissappear completely, hiding the draggable tag as well. Garland.
The .js is misc/tabledrag.js

omniverse’s picture

It's a bug in the tabledrag.js code which hides the entire Weight column, then attaches the draggable area to the first column.
So, if your Weight is the first field, the draggable area will be hidden along with it.

If you change the field order in your view so the Weight is somewhere other than the 1st spot, it will work.

nancydru’s picture

Thank you, Todd. So this is really a Views or core bug?

jody lynn’s picture

It's sort of a limitation of the core drag and drop. The weight README on how to create an orderable view actually already points out to avoid doing this. We could get around it in other ways to prevent this limitation (perhaps by adding an empty first column before any real columns in the view)

nancydru’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Thanks, Jody. So this is something I can't really fix, other than maybe adding something else to the README.