Refresh a widget after using JumpToDashboard
Is there a way to modify the JTD plugin so that when a Modal overlay with a jumped-to dashboard is closed, the widget originating the Jump is refreshed ?
For anyone who finds this thread, I found a way by modifying DrilledDashboardDisplayModal.js
update the existing bind() on the overlay similar to code below. This version finds and refreshes every Pivot2 widget on a dashboard after the modal overlay closes. It's not exactly my original question, but close enough for most cases.
var overlay = $('div.md-overlay');
overlay.bind('click', function () {
$('body').trigger('click');
console.log ('closing the window');
prism.activeDashboard.widgets.$$widgets.forEach((widget) =>
{
if (widget.type == 'pivot2') {
widget.refresh();
console.log ('refreshing pivot widget');
}
} )
overlay.unbind('click', arguments.callee);
});