Format all widget titles using Dashboard Script
I'm looking for a script to update all of the titles on a dashboard with consistent formatting (text-align, bold, etc).
I have the Format Widget Title plugin, but I would really like to have a method that doesn't require me to modify every single widget one-by-one.
Can anyone help?
-
Here's kind of a way to do it. It's not perfect, and was pretty quick, but does basically what you want. Maybe the text alignment can be better.
dashboard.on('widgetinitialized', (el, args) => {
$('widget-header')
.css('background-color', 'yellow')
.css('color', 'black')
.css('font-family', 'Arial')
.css('font-weight', 'bold');
$('.widget-title__holder')
.css('font-size', '16px')
.css('padding-left', '38%');
});
Hope this helps!
Best, Elliott
Please sign in to leave a comment.
Comments
1 comment