Download & Extend

Drag'n'drop language order

Project:Drupal core
Version:7.x-dev
Component:language system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
language-dnd.patch2.94 KBIgnored: Check issue status.NoneNone
LanguageDND.png56.63 KBIgnored: Check issue status.NoneNone

#2

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.

#3

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.

AttachmentSizeStatusTest resultOperations
locale_help.patch2.92 KBIgnored: Check issue status.NoneNone

#4

Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
locale_reorder_help.patch3.76 KBIgnored: Check issue status.NoneNone

#5

Status:needs review» reviewed & tested by the community

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

#6

Btw, does drag'n'drops need tests?

#7

Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks.

--project followup subject--

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

--project followup subject--

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

#8

Status:fixed» closed (fixed)

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

nobody click here