CRM-17176 add button to reset reports
authorAnthony Nemirovsky <anemirovsky@giantrabbit.com>
Tue, 29 Sep 2015 02:53:59 +0000 (15:53 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Wed, 30 Sep 2015 06:54:21 +0000 (19:54 +1300)
CRM-17176 fix line break

templates/CRM/Admin/Page/Navigation.tpl

index 21505bac633252c8098cbec6b8f3abd11c91cbd2..8ecdb2a3259867dff69abf6335ca5e9a3219bda1 100644 (file)
     <div class="spacer"></div>
     <div id="navigation-tree" class="navigation-tree" style="height:auto; border-collapse:separate; background-color:#FFFFFF;"></div>
     <div class="spacer"></div>
+    <div>
+      <a href="{crmURL p="#"}" id='nav-reset'><span>{ts}Click here{/ts}</span></a> {ts}to reset the reports menu structure to the default.{/ts}
+    </div>
+    <div class="spacer"></div>
   </div>
   {literal}
   <style type="text/css">
   </style>
   <script type="text/javascript">
     CRM.$(function($) {
+      $('#nav-reset').on('click', function(e) {
+        e.preventDefault();
+        CRM.api3('Navigation', 'reset', {'for' : 'report'}, ts('Report menu reset. Changes will be visible when you refresh'))
+      });
       $("#navigation-tree").jstree({
         plugins: [ "themes", "json_data", "dnd","ui", "crrm","contextmenu" ],
         json_data: {