<div id="navigation-tree" class="navigation-tree" style="height:auto; border-collapse:separate; background-color:#FFFFFF;"></div>
<div class="spacer"></div>
<div>
- {* TODO: fa-broom would be better, but not implemented yet. https://github.com/FortAwesome/Font-Awesome/issues/239 *}
- <a href="#" class="nav-reset crm-hover-button"><i class="crm-i fa-undo"></i> {ts}Cleanup reports menu{/ts}</a>
+ <a href="#" class="nav-reset crm-hover-button">
+ {* TODO: fa-broom would be better, but not implemented yet. https://github.com/FortAwesome/Font-Awesome/issues/239 *}
+ <i class="crm-i fa-undo"></i> {ts}Cleanup reports menu{/ts}
+ </a>
</div>
<div class="spacer"></div>
</div>
$('a.nav-reset').on('click', function(e) {
e.preventDefault();
- CRM.confirm({message: '{/literal}{ts escape='js'}This will rebuild the "Reports" menu to include all currently active reports.{/ts}{literal}'})
- .on('crmConfirm:yes', function () {
+ CRM.confirm({
+ title: $(this).text(),
+ message: '{/literal}{ts escape='js'}This will rebuild the "Reports" menu to include all currently active reports.{/ts}{literal}'
+ })
+ .on('crmConfirm:yes', function() {
+ $('#crm-container').block();
CRM.api3('Navigation', 'reset', {'for': 'report'}, true)
.done(function() {
+ $('#crm-container').unblock();
$("#navigation-tree").jstree('refresh');
$("#reset-menu").show();
})