Problem/Motivation
Drupal core's tabledrag.js
uses a hard-coded markup for the tabledrag toggle height markup and its wrapper div that are not overridable by themes.
Proposed resolution
- Introduce new Drupal.theme callback for the toggle weight (visibility) button.
- Introduce new Drupal.theme callback for the toggle button wrapper.
- Refactor
tabledrag.js
and fully replace the toggle if it is changed. This is required for adding different icons for the 'show' and the 'hide' action.