1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 10:15:28 +02:00

Fix issue where clone action icon didn't appear on a nested repeater within a FieldtypeFieldsetPage

This commit is contained in:
Ryan Cramer
2022-03-20 10:55:13 -04:00
parent 0674776c4b
commit 1b5cd4f50e

View File

@@ -1233,12 +1233,13 @@ function InputfieldRepeater($) {
$controls.prepend($collapseControl); $controls.prepend($collapseControl);
$controls.prepend($insertBeforeControl); $controls.prepend($insertBeforeControl);
$controls.prepend($insertAfterControl); $controls.prepend($insertAfterControl);
if($t.closest('.InputfieldRepeater').hasClass('InputfieldRepeaterHasSettings')) { // intentionally not using allowSettings var var $closestRepeater = $t.closest('.InputfieldRepeater');
if($closestRepeater.hasClass('InputfieldRepeaterHasSettings')) { // intentionally not using allowSettings var
var $settingsToggle = $("<i class='fa fa-gear InputfieldRepeaterSettingsToggle ui-priority-secondary'></i>") var $settingsToggle = $("<i class='fa fa-gear InputfieldRepeaterSettingsToggle ui-priority-secondary'></i>")
.attr('title', cfg.labels.settings); .attr('title', cfg.labels.settings);
$controls.prepend($settingsToggle); $controls.prepend($settingsToggle);
} }
if(allowClone) { if(allowClone || !$closestRepeater.hasClass('InputfieldRepeaterNoAjaxAdd')) {
$controls.prepend($clone.clone(true)); $controls.prepend($clone.clone(true));
// $controls.prepend($paste.clone(true)); // $controls.prepend($paste.clone(true));
} }