drupal_add_tabledrag() does some funky stuff there, and even has a dependency on the jquery.cookie library.
Tabledrag itself should be registered and used as a library; drupal.tabledrag.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | system-tabledrag-to-library-1415828-12.patch | 1.33 KB | damiankloip |
| #6 | core-js-tabledrag-lib-1415828-6.patch | 4.35 KB | nod_ |
| #3 | system-tabledrag-to-library-1415828-3.patch | 1.18 KB | patrickd |
| #1 | system-tabledrag-to-library-1415828-1.patch | 1.44 KB | BJ___ |
Comments
Comment #1
BJ___ commentedHere is a patch :)
Could you elaborate a little bit on "Funky stuff" ? Funky like John Coltrane ?
Is there something more to be done here ?
Comment #2
sunComment #3
patrickd commentedlooks good, but you added some whitespaces at system.module, make sure to remove all auto-indents your editor creates
Comment #4
BJ___ commentedI don't think any whitespace was added. I think it's just that there was one space removed, and then one space added. Thus - then + .
But it could be misread and shouldn't be there anyway. The patch passed simple test.
Brings up an interesting point though. The reason that it was there was because I wasn't quite sure where to place it.
The alphabetical order is a bit wonky in the system module. I'm not sure if that is intended or needs to be cleaned up. Maybe worth a look.
Comment #5
tecnomarcos commentedComment #6
nod_updated and removed the dependency on jquery.cookie by using localStorage.
Comment #7
nod_Moving over to #1524414: Rewrite tabledrag.js to use jQuery UI
Comment #8
sunHrm. That issue looks like a major effort, which might even take months to complete, given how much research and also testing will have to be done. Contrary to that, #1415828: Tabledrag should be a library is a very trivial refactoring (and the replacement of jquery cookie was never within the scope of that issue).
I'd really prefer to be on the safe side for D8 and do the trivial refactoring first, which can land at any time and does not require manual testing. Therefore, I'm going to re-open the issue.
Comment #9
sunPatch in #3 looks fine - we're just missing the dependency on jquery.cookie in the library definition, which then allows us to remove all the manual additions of the jquery.cookie library wherever tabledrag is added.
Comment #10
nod_Yeah remember now, the localstorage thing was remove the need for adding jquery.cookie to the party since it's not needed for D8.
can reroll without it if you still want to go with cookies.
Comment #11
sunyeah, let's just do the change in PHP here. And since that only touches PHP code, that makes the essential difference to #1415828: Tabledrag should be a library ;)
Comment #12
damiankloip commentedThis should do it then?
Comment #13
nod_looks good to me.
Comment #14
nod_Comment #15
sunI double-checked that this is the only invocation. Good to go.
Comment #16
dries commentedCommitted to 8.x. Thanks.