The console lines just print diagnostic messages. All modern browsers have a console object, so you can leave them if you want. If you do remove them, an empty catch block won't cause any problems. ...
See more...
The console lines just print diagnostic messages. All modern browsers have a console object, so you can leave them if you want. If you do remove them, an empty catch block won't cause any problems. The rest of the sample code just responds to click events. Looking at the custom_token_links dashboard example, you can see how this is done: <a href="#" class="btn-pill" data-set-token="show_chart" data-value="show" data-unset-token="show_table">
Show Chart
</a> When you click on Show Chart, the click event hander is called, explicitly passing the data-set-token and data-unset-token values. In this example, data-unset-token is set to show_table, and the click handler sets the show_table token value to undefined. Because the table has a dependency on $show_table$, the table is hidden when show_table is undefined. If you can post a representative copy of the broken dashboard, we can probably fix it.