From df1b6e34ec65548f25b6f94dc801bae277fb0a08 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 15 Oct 2015 11:36:13 -0400 Subject: [PATCH] CRM-17176 - More improvements to reports menu reset ui --- templates/CRM/Admin/Page/Navigation.tpl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/CRM/Admin/Page/Navigation.tpl b/templates/CRM/Admin/Page/Navigation.tpl index 5f78177c56..7399bdeacc 100644 --- a/templates/CRM/Admin/Page/Navigation.tpl +++ b/templates/CRM/Admin/Page/Navigation.tpl @@ -42,8 +42,10 @@
- {* TODO: fa-broom would be better, but not implemented yet. https://github.com/FortAwesome/Font-Awesome/issues/239 *} - {ts}Cleanup reports menu{/ts} + + {* TODO: fa-broom would be better, but not implemented yet. https://github.com/FortAwesome/Font-Awesome/issues/239 *} + {ts}Cleanup reports menu{/ts} +
@@ -170,10 +172,15 @@ $('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(); }) -- 2.25.1