Skip to content
Snippets Groups Projects
Commit b2963f6a authored by Vasantha Deepika's avatar Vasantha Deepika Committed by Sascha Eggenberger
Browse files

Resolve #3495320 "Show row weights"

parent 832960ec
Branches
Tags 4.0.5
No related merge requests found
Pipeline #427921 passed
......@@ -1813,8 +1813,22 @@
* @return {string}
* HTML markup for the weight toggle button content.s
*/
toggleButtonContent: (show) =>
show ? Drupal.t('Hide row weights') : Drupal.t('Show row weights'),
toggleButtonContent: (show) => {
const classes = [
'action-link',
'action-link--extrasmall',
'tabledrag-toggle-weight',
];
let text = '';
if (show) {
classes.push('action-link--icon-hide');
text = Drupal.t('Hide row weights');
} else {
classes.push('action-link--icon-show');
text = Drupal.t('Show row weights');
}
return `<span class="${classes.join(' ')}">${text}</span>`;
},
/**
* @return {string}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment