Default/Domain/User Settings: Uncheck the 'Check All' checkbox for a category when a subcategory item is unchecked.

Default Settings: Hide the 'Check All' checkboxes when using the search.
This commit is contained in:
reliberate
2016-03-17 08:45:07 -06:00
parent f7aca7239c
commit be721b1686
3 changed files with 8 additions and 6 deletions

View File

@@ -143,7 +143,7 @@ else {
&& permission_exists("user_setting_add")
&& count($_SESSION['domains']) > 1) ||
permission_exists('user_setting_delete')) {
echo "<th style='width: 30px; text-align: center; padding: 0px;'><input type='checkbox' onchange=\"(this.checked) ? check('all','".strtolower($row['user_setting_category'])."') : check('none','".strtolower($row['user_setting_category'])."');\"></th>";
echo "<th style='width: 30px; text-align: center; padding: 0px;'><input type='checkbox' id='chk_all_".$row['user_setting_category']."' class='chk_all' onchange=\"(this.checked) ? check('all','".strtolower($row['user_setting_category'])."') : check('none','".strtolower($row['user_setting_category'])."');\"></th>";
}
echo "<th>".$text['label-subcategory']."</th>";
echo "<th>".$text['label-type']."</th>";
@@ -166,7 +166,7 @@ else {
(permission_exists("domain_select") && permission_exists("user_setting_add") && count($_SESSION['domains']) > 1) ||
permission_exists("user_setting_delete")
) {
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center; padding: 3px 0px 0px 0px;'><input type='checkbox' name='id[]' id='checkbox_".$row['user_setting_uuid']."' value='".$row['user_setting_uuid']."'></td>\n";
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='text-align: center; padding: 3px 0px 0px 0px;'><input type='checkbox' name='id[]' id='checkbox_".$row['user_setting_uuid']."' value='".$row['user_setting_uuid']."' onclick=\"if (!this.checked) { document.getElementById('chk_all_".$row['user_setting_category']."').checked = false; }\"></td>\n";
$subcat_ids[strtolower($row['user_setting_category'])][] = 'checkbox_'.$row['user_setting_uuid'];
}
echo " <td valign='top' class='".$row_style[$c]."'>";