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.
Problem/Motivation
Drupal core's tabledrag.js uses a hard-coded markup for the representation of tabledrag-hande. Because of this, the markup of that handle is not overridable by themes.
Proposed resolution
Introduce new Drupal.theme callback for the handle.
Remaining tasks
There are other hard-coded markups in the JavaScript file.
We should consider repairing them as well, maybe in (a) separated issue(s).
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#21 | 3077938-21.patch | 7.04 KB | komalk |
#19 | 3077938-19_REROLL.patch | 7.2 KB | bnjmnm |
#15 | interdiff_8-15.txt | 1.9 KB | bnjmnm |
#15 | 3077938-15.patch | 7.15 KB | bnjmnm |
#12 | interdiff_8-12.txt | 820 bytes | ravi.shankar |
Comments
Comment #3
sibustephen CreditAttribution: sibustephen as a volunteer and at Acquia commentedComment #4
sibustephen CreditAttribution: sibustephen as a volunteer and at Acquia commentedAttaching patch for above issue.
Added a `tabledrag` function, which can be reused in generic.
Comment #6
komalk CreditAttribution: komalk at Material for Drupal India Association commentedComment #8
bnjmnmAddressed multiple issues with the patch.
= The functions were not theme functions,
- The
header
variable was a string when the code below it was expecting a jQuery object,- Did not pass JS code standards
Comment #9
bnjmnmWas wrong about "The functions were not theme functions" in #8, they were extending Drupal.theme. Going to see if it's preferable to continue that pattern or if it's better for new theme functions to not use jQuery when possible.
Comment #10
lauriiiComment #11
nod_That should be in the $.extends above like the other theme functions.
Comment #12
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedHere I have tried to address comment #11, please review.
Comment #13
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedLooks like @sibustephen is not working anymore on this issue.
Comment #14
nod_The file that needs to be changed is the .es6.js file, see: https://www.drupal.org/docs/frontend-developer-tools-for-drupal-core#s-j...
No need to add a new, $.extends, you can use the one that's already there a few lines above.
Comment #15
bnjmnmAddresses #11. Interdiffs from #8 as the change is more apparent than were it diffed from #12
Comment #16
lauriiiComment #17
bnjmnmAdded CR https://www.drupal.org/node/3161073
Comment #18
lauriiiComment #19
bnjmnmRerolled
Comment #20
lauriiiIt seems like the reroll is not 100% correct
Comment #21
komalk CreditAttribution: komalk at Material for Drupal India Association commentedWorked on #20.
Comment #22
nod_Looks good to me, Still works.
The linebreak is inside the html tag between 2 attributes, so there is no visual change because of it.
rename of the $handle var follow conventions and is done locally so no impact on the rest of the code.
Comment #24
lauriiiCommitted 4790a87 and pushed to 9.1.x. Thanks!
Comment #26
quietone CreditAttribution: quietone at PreviousNext commentedpublished the change record