mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 20:41:16 +02:00
Update the clone/copy repeater item function to also account for InputfieldTable rows that may be present in the repeater
This commit is contained in:
@@ -347,6 +347,11 @@ function InputfieldRepeater($) {
|
||||
initRepeater($addItem);
|
||||
$addItem.unwrap(); // unwrap div once item initialized
|
||||
$addItem.find('.Inputfield').trigger('reloaded', [ 'InputfieldRepeaterItemAdd' ]);
|
||||
if(cloneID) {
|
||||
$addItem.find('.Inputfield').trigger('cloned', [ 'InputfieldRepeaterItemAdd' ]);
|
||||
// next line can remove 9/2019, as 'cloned' support will have been in InputfieldTable for awhile
|
||||
$addItem.find('.InputfieldTableRowID').val(0);
|
||||
}
|
||||
$addItem.find('.InputfieldRepeaterSort').val($inputfields.children().length);
|
||||
$('html, body').animate({
|
||||
scrollTop: $addItem.offset().top
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user