Inspired by #287949: Language weights not working on nodes, I figured that perhaps it was time to remove the "Weight" column on admin/settings/language in favour of those nifty drag'n'drop thingies used elsewhere in the interface.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
56.63 KB
2.94 KB

Wow, this is not implemented yet. OMG. Here is a quick patch to make this work and a screenshot to prove it works. Basically, added class to the weight, to the draggable rows and id to the table. Added the tabledrag control to the page. Then also realized the columns should be reordered, so that the checkbox is not first. Same reordering happened for drag and drop enablement on pages such as the menu overview, so I did the same to get to a familiar experience. It all seem to be work visually. Please review.

Dries’s picture

Status: Needs review » Needs work

Tested and works. I've committed this to CVS HEAD.

I'm marking this patch "code needs work" instead of "fixed" because we don't seem to explain why you might want to change the order. We didn't explain it before this patch either but it seems like it should. Let's follow-up with a patch that makes this more clear for the end-user.

Gábor Hojtsy’s picture

FileSize
2.92 KB

Added this sentence to the help text:

Languages will be displayed in the order you specify in places such as the language switcher block, or the language dropdown when creating or editing posts.

We should also have a copy of the usual "how to drag and drop" text found on all other drag and drop enabled forms copied over here, so I keep this patch needs work.

meba’s picture

Status: Needs work » Needs review
FileSize
3.76 KB

Adding a "how to drag and drop" text. Marking as code needs review.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks great to me. Drag and drop text is as standard in other modules.

Freso’s picture

Btw, does drag'n'drops need tests?

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.