Changeset 3350770
- Timestamp:
- 08/27/2025 03:45:42 AM (6 months ago)
- Location:
- bulk-content-toolkit
- Files:
-
- 6 edited
- 4 copied
-
tags/1.2.7 (copied) (copied from bulk-content-toolkit/trunk)
-
tags/1.2.7/bulk-content-toolkit.php (copied) (copied from bulk-content-toolkit/trunk/bulk-content-toolkit.php) (2 diffs)
-
tags/1.2.7/includes/admin/quick-edit.php (modified) (1 diff)
-
tags/1.2.7/includes/frontend/enqueue-scripts.php (copied) (copied from bulk-content-toolkit/trunk/includes/frontend/enqueue-scripts.php)
-
tags/1.2.7/js/user.js (modified) (4 diffs)
-
tags/1.2.7/readme.txt (copied) (copied from bulk-content-toolkit/trunk/readme.txt) (2 diffs)
-
trunk/bulk-content-toolkit.php (modified) (2 diffs)
-
trunk/includes/admin/quick-edit.php (modified) (1 diff)
-
trunk/js/user.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bulk-content-toolkit/tags/1.2.7/bulk-content-toolkit.php
r3350483 r3350770 3 3 Plugin Name: Bulk Content Toolkit 4 4 Description: A comprehensive toolkit for efficiently managing bulk actions on various types of content in WordPress, including posts, pages, and custom post types. 5 Version: 1.2. 55 Version: 1.2.7 6 6 Requires at least: 5.0 7 7 Tested up to: 6.8 … … 157 157 continue; 158 158 } 159 // select et checkbox sont les deux seuls a ne pas avoir de select prealable 160 if ($input_type === 'select' && isset($_REQUEST[$custom_field_key]) && $_REQUEST[$custom_field_key] === '') { 161 bulkedittoolkit_debug_log("Skipping field $field_name due to 'No Change' selection", $GLOBALS["bulkedittoolkit_is_debug_active"]); 162 continue; 163 } 159 164 160 165 // Handle checkboxes specifically 161 if ($input_type === 'checkbox') { 166 if ($input_type === 'checkbox') { 167 $custom_field_key = 'custom_' . $custom_field_key; 162 168 if (isset($_REQUEST[$custom_field_key])) { 163 169 $value = sanitize_text_field($_REQUEST[$custom_field_key]); -
bulk-content-toolkit/tags/1.2.7/includes/admin/quick-edit.php
r3349434 r3350770 143 143 144 144 function bulkedittoolkit_generate_switch_html($field_name, $context) { 145 return '<input type="checkbox" name="' . esc_attr('custom_' . $field_name) . '" id="bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" value="yes" data-initial-state="mixed" />' . 145 $html = ''; 146 if ($context === 'bulk') $html = '<input type="hidden" name="' . esc_attr('custom_' . $field_name) . '" value="yes"' . ' id="hidden_bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" />'; 147 return $html .= '<input type="checkbox" name="' . esc_attr('custom_' . $field_name) . '" id="bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" value="yes" data-initial-state="mixed" />' . 146 148 '<div class="slider"></div>'; 147 149 } -
bulk-content-toolkit/tags/1.2.7/js/user.js
r3350006 r3350770 53 53 const bulkEditSwitch = document.querySelector('#' + bulkEditId + '[type="checkbox"]'); 54 54 const bulkEditSelect = document.querySelector('#' + bulkEditId + '[type="select"]'); 55 const hiddenSwitchInput = document.querySelector('#hidden_' + bulkEditId); 55 56 56 57 if (bulkEditSwitch) { … … 79 80 bulkEditSwitch.removeAttribute('data-indeterminate'); 80 81 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 82 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 83 hiddenSwitchInput.setAttribute('value', 'yes'); 81 84 } else if (allNo) { 82 85 bulkEditSwitch.indeterminate = false; … … 86 89 bulkEditSwitch.removeAttribute('data-indeterminate'); 87 90 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 91 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 92 hiddenSwitchInput.setAttribute('value', 'no'); 88 93 } else { 89 94 bulkEditSwitch.indeterminate = true; … … 93 98 bulkEditSwitch.setAttribute('data-indeterminate', 'true'); 94 99 bulkEditSwitch.parentNode.classList.add('indeterminate'); 100 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 101 hiddenSwitchInput.setAttribute('value', 'indeterminate'); 95 102 } 103 104 // --- AJOUT DES LISTENERS ICI --- 105 // Écouteur pour le clic sur le slider 106 /*const slider = bulkEditSwitch.nextElementSibling; 107 if (slider && slider.classList.contains('slider')) { 108 slider.addEventListener('click', function() { 109 bulkEditSwitch.indeterminate = false; 110 bulkEditSwitch.checked = !bulkEditSwitch.checked; 111 bulkEditSwitch.removeAttribute('data-indeterminate'); 112 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 113 hiddenSwitchInput.value = bulkEditSwitch.checked ? 'yes' : 'no'; 114 }); 115 } 116 */ 117 // Écouteur pour le changement d'état de la checkbox 118 bulkEditSwitch.addEventListener('change', function() { 119 //console.log("ALLO"); 120 bulkEditSwitch.indeterminate = false; 121 bulkEditSwitch.removeAttribute('data-indeterminate'); 122 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 123 bulkEditSwitch.value = bulkEditSwitch.checked ? 'yes' : 'no'; 124 hiddenSwitchInput.value = bulkEditSwitch.checked ? 'yes' : 'no'; 125 }); 126 // --- FIN DES LISTENERS --- 127 96 128 } else { 97 129 console.log('Failed to get statuses for field:', fieldName); -
bulk-content-toolkit/tags/1.2.7/readme.txt
r3350483 r3350770 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable Tag: 1.2. 58 Stable Tag: 1.2.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 46 46 47 47 == Changelog == 48 49 = 1.2.7 = 50 - Fixed: Select and switch definitively handled in bulk edit 48 51 49 52 = 1.2.5 = -
bulk-content-toolkit/trunk/bulk-content-toolkit.php
r3350483 r3350770 3 3 Plugin Name: Bulk Content Toolkit 4 4 Description: A comprehensive toolkit for efficiently managing bulk actions on various types of content in WordPress, including posts, pages, and custom post types. 5 Version: 1.2. 55 Version: 1.2.7 6 6 Requires at least: 5.0 7 7 Tested up to: 6.8 … … 157 157 continue; 158 158 } 159 // select et checkbox sont les deux seuls a ne pas avoir de select prealable 160 if ($input_type === 'select' && isset($_REQUEST[$custom_field_key]) && $_REQUEST[$custom_field_key] === '') { 161 bulkedittoolkit_debug_log("Skipping field $field_name due to 'No Change' selection", $GLOBALS["bulkedittoolkit_is_debug_active"]); 162 continue; 163 } 159 164 160 165 // Handle checkboxes specifically 161 if ($input_type === 'checkbox') { 166 if ($input_type === 'checkbox') { 167 $custom_field_key = 'custom_' . $custom_field_key; 162 168 if (isset($_REQUEST[$custom_field_key])) { 163 169 $value = sanitize_text_field($_REQUEST[$custom_field_key]); -
bulk-content-toolkit/trunk/includes/admin/quick-edit.php
r3349434 r3350770 143 143 144 144 function bulkedittoolkit_generate_switch_html($field_name, $context) { 145 return '<input type="checkbox" name="' . esc_attr('custom_' . $field_name) . '" id="bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" value="yes" data-initial-state="mixed" />' . 145 $html = ''; 146 if ($context === 'bulk') $html = '<input type="hidden" name="' . esc_attr('custom_' . $field_name) . '" value="yes"' . ' id="hidden_bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" />'; 147 return $html .= '<input type="checkbox" name="' . esc_attr('custom_' . $field_name) . '" id="bulk_edit_custom_' . esc_attr($field_name) . '_' . esc_attr($context) . '" value="yes" data-initial-state="mixed" />' . 146 148 '<div class="slider"></div>'; 147 149 } -
bulk-content-toolkit/trunk/js/user.js
r3350006 r3350770 53 53 const bulkEditSwitch = document.querySelector('#' + bulkEditId + '[type="checkbox"]'); 54 54 const bulkEditSelect = document.querySelector('#' + bulkEditId + '[type="select"]'); 55 const hiddenSwitchInput = document.querySelector('#hidden_' + bulkEditId); 55 56 56 57 if (bulkEditSwitch) { … … 79 80 bulkEditSwitch.removeAttribute('data-indeterminate'); 80 81 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 82 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 83 hiddenSwitchInput.setAttribute('value', 'yes'); 81 84 } else if (allNo) { 82 85 bulkEditSwitch.indeterminate = false; … … 86 89 bulkEditSwitch.removeAttribute('data-indeterminate'); 87 90 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 91 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 92 hiddenSwitchInput.setAttribute('value', 'no'); 88 93 } else { 89 94 bulkEditSwitch.indeterminate = true; … … 93 98 bulkEditSwitch.setAttribute('data-indeterminate', 'true'); 94 99 bulkEditSwitch.parentNode.classList.add('indeterminate'); 100 hiddenSwitchInput.setAttribute('name', 'custom_' + fieldName); 101 hiddenSwitchInput.setAttribute('value', 'indeterminate'); 95 102 } 103 104 // --- AJOUT DES LISTENERS ICI --- 105 // Écouteur pour le clic sur le slider 106 /*const slider = bulkEditSwitch.nextElementSibling; 107 if (slider && slider.classList.contains('slider')) { 108 slider.addEventListener('click', function() { 109 bulkEditSwitch.indeterminate = false; 110 bulkEditSwitch.checked = !bulkEditSwitch.checked; 111 bulkEditSwitch.removeAttribute('data-indeterminate'); 112 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 113 hiddenSwitchInput.value = bulkEditSwitch.checked ? 'yes' : 'no'; 114 }); 115 } 116 */ 117 // Écouteur pour le changement d'état de la checkbox 118 bulkEditSwitch.addEventListener('change', function() { 119 //console.log("ALLO"); 120 bulkEditSwitch.indeterminate = false; 121 bulkEditSwitch.removeAttribute('data-indeterminate'); 122 bulkEditSwitch.parentNode.classList.remove('indeterminate'); 123 bulkEditSwitch.value = bulkEditSwitch.checked ? 'yes' : 'no'; 124 hiddenSwitchInput.value = bulkEditSwitch.checked ? 'yes' : 'no'; 125 }); 126 // --- FIN DES LISTENERS --- 127 96 128 } else { 97 129 console.log('Failed to get statuses for field:', fieldName); -
bulk-content-toolkit/trunk/readme.txt
r3350483 r3350770 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable Tag: 1.2. 58 Stable Tag: 1.2.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 46 46 47 47 == Changelog == 48 49 = 1.2.7 = 50 - Fixed: Select and switch definitively handled in bulk edit 48 51 49 52 = 1.2.5 =
Note: See TracChangeset
for help on using the changeset viewer.