From be721b16866913dc36aa0d9bf3e633dc32452d96 Mon Sep 17 00:00:00 2001 From: reliberate Date: Thu, 17 Mar 2016 08:45:07 -0600 Subject: [PATCH] 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. --- core/default_settings/default_settings.php | 6 ++++-- core/domain_settings/domain_settings.php | 4 ++-- core/users/user_settings.php | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index 52293206ca..46b9562017 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -342,7 +342,7 @@ else { (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) || permission_exists('default_setting_delete') ) { - echo ""; + echo ""; } echo "".$text['label-subcategory'].""; echo "".$text['label-type'].""; @@ -366,7 +366,7 @@ else { (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) || permission_exists("default_setting_delete") ) { - echo " \n"; + echo " \n"; $subcat_ids[strtolower($row['default_setting_category'])][] = 'checkbox_'.$row['default_setting_uuid']; } echo " "; @@ -473,6 +473,7 @@ else { echo " function setting_search() {\n"; echo " var criteria = $('#default_setting_search').val();\n"; echo " if (criteria.length >= 2) {\n"; + echo " $('.chk_all').hide();\n"; echo " for (var x = 0; x < categories.length; x++) {\n"; echo " document.getElementById('category_'+categories[x]).style.display = 'none';\n"; echo " }\n"; @@ -493,6 +494,7 @@ else { echo " }\n"; echo " }\n"; echo " else {\n"; + echo " $('.chk_all').show();\n"; echo " for (var x = 0; x < setting_uuids.length; x++) {\n"; echo " document.getElementById('category_'+categories[x]).style.display = '';\n"; echo " document.getElementById('setting_'+setting_uuids[x]).style.display = '';\n"; diff --git a/core/domain_settings/domain_settings.php b/core/domain_settings/domain_settings.php index 0421f4bd3e..87b1cad66e 100644 --- a/core/domain_settings/domain_settings.php +++ b/core/domain_settings/domain_settings.php @@ -173,7 +173,7 @@ if (sizeof($_REQUEST) > 1) { && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) || permission_exists('domain_setting_delete')) { - echo ""; + echo ""; } echo "".$text['label-subcategory'].""; echo "".$text['label-type'].""; @@ -196,7 +196,7 @@ if (sizeof($_REQUEST) > 1) { (permission_exists("domain_select") && permission_exists("domain_setting_add") && count($_SESSION['domains']) > 1) || permission_exists("domain_setting_delete") ) { - echo " \n"; + echo " \n"; $subcat_ids[strtolower($row['domain_setting_category'])][] = 'checkbox_'.$row['domain_setting_uuid']; } echo " "; diff --git a/core/users/user_settings.php b/core/users/user_settings.php index 98d06cbeb8..6ca0c64981 100644 --- a/core/users/user_settings.php +++ b/core/users/user_settings.php @@ -143,7 +143,7 @@ else { && permission_exists("user_setting_add") && count($_SESSION['domains']) > 1) || permission_exists('user_setting_delete')) { - echo ""; + echo ""; } echo "".$text['label-subcategory'].""; echo "".$text['label-type'].""; @@ -166,7 +166,7 @@ else { (permission_exists("domain_select") && permission_exists("user_setting_add") && count($_SESSION['domains']) > 1) || permission_exists("user_setting_delete") ) { - echo " \n"; + echo " \n"; $subcat_ids[strtolower($row['user_setting_category'])][] = 'checkbox_'.$row['user_setting_uuid']; } echo " ";