Improved visibility of Totals only checkbox on reports.php for multiple group by.
authorNik Okuntseff <support@anuko.com>
Wed, 31 Oct 2018 12:40:28 +0000 (12:40 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 31 Oct 2018 12:40:28 +0000 (12:40 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/reports.tpl
reports.php

index be04ad9..1a52dda 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.03.4335 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.03.4336 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index feb5800..418c172 100644 (file)
@@ -138,8 +138,10 @@ function selectAssignedUsers(project_id) {
 function handleCheckboxes() {
   var totalsOnlyCheckbox = document.getElementById("chtotalsonly");
   var totalsOnlyLabel = document.getElementById("totals_only_label");
-  if ("no_grouping" == document.getElementById("group_by1").value) {
-    // Unmark and disable the "Totals only" checkbox.
+  if ("no_grouping" == document.getElementById("group_by1").value
+      && "no_grouping" == document.getElementById("group_by2").value
+      && "no_grouping" == document.getElementById("group_by3").value) {
+    // Unmark and hide the "Totals only" checkbox.
     totalsOnlyCheckbox.checked = false;
     totalsOnlyCheckbox.style.visibility = "hidden";
     totalsOnlyLabel.style.visibility = "hidden";
index ae7f552..31028f2 100644 (file)
@@ -234,8 +234,8 @@ if ($custom_fields && $custom_fields->fields[0] && $custom_fields->fields[0]['ty
 }
 $group_by_options_size = sizeof($group_by_options);
 $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by1','data'=>$group_by_options));
-if ($group_by_options_size > 2) $form->addInput(array('type'=>'combobox','name'=>'group_by2','data'=>$group_by_options));
-if ($group_by_options_size > 3) $form->addInput(array('type'=>'combobox','name'=>'group_by3','data'=>$group_by_options));
+if ($group_by_options_size > 2) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by2','data'=>$group_by_options));
+if ($group_by_options_size > 3) $form->addInput(array('type'=>'combobox','onchange'=>'handleCheckboxes();','name'=>'group_by3','data'=>$group_by_options));
 $form->addInput(array('type'=>'checkbox','name'=>'chtotalsonly'));
 
 // Add text field for a new favorite report name.