We already have a script to highlight i-buttons having description. In view mode, widget i-buttons are visible only if we hover over the widget. Here is a script to always show the i-buttons with description.
Steps:
Create a dashboard and add some widgets in it. Add description to required widgets
Add below script to dashboard
Save the script and refresh dashboard
dashboard.on('widgetready', function(se, ev){
if(ev.widget.desc && ev.widget.desc.trim().length > 0)
{
let toolBarWidth = 190
console.log(toolBarWidth)
$(`widget[widgetid="${ev.widget.oid}"] widget-header .app-icon--general-info-circle`).css('color', 'red')
$(`widget[widgetid="${ev.widget.oid}"] widget-header .app-icon--general-info-circle`).closest(' widget-toolbar').css('width', toolBarWidth + 'px')
$(`widget[widgetid="${ev.widget.oid}"] widget-header .app-icon--general-info-circle`).closest('.widget-toolbar-btn').css('opacity', '1')
}
})
Comments