top of page

Always show i-buttons having description

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:

  1. Create a dashboard and add some widgets in it. Add description to required widgets

  2. Add below script to dashboard

  3. 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')
	}

})

110 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page