Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | locale_reorder_help.patch | 3.76 KB | meba |
#3 | locale_help.patch | 2.92 KB | Gábor Hojtsy |
#1 | language-dnd.patch | 2.94 KB | Gábor Hojtsy |
#1 | LanguageDND.png | 56.63 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyWow, 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.
Comment #2
Dries CreditAttribution: Dries commentedTested 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.
Comment #3
Gábor HojtsyAdded this sentence to the help text:
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.
Comment #4
meba CreditAttribution: meba commentedAdding a "how to drag and drop" text. Marking as code needs review.
Comment #5
Gábor HojtsyLooks great to me. Drag and drop text is as standard in other modules.
Comment #6
Freso CreditAttribution: Freso commentedBtw, does drag'n'drops need tests?
Comment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.