1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Attempt fix issue processwire/processwire-issues#359 where certain repeater/repeater-matrix combinations weren't initializing propertly

This commit is contained in:
Ryan Cramer
2017-09-11 10:44:32 -04:00
parent 009a2d9342
commit 5a9c8fea58
2 changed files with 3 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ function InputfieldRepeater($) {
if(source == 'InputfieldRepeaterItemEdit' || source == 'InputfieldRepeaterItemAdd') {
event.stopPropagation();
var $r = $(this).find(".InputfieldRepeater");
if($r.length) initRepeater($r);
if($r.length) $r.each(function() { initRepeater($(this)) });
return;
}
}
@@ -743,6 +743,7 @@ function InputfieldRepeater($) {
initSortable($inputfieldRepeater, $inputfields);
// setup the add links
console.log($inputfieldRepeater);
$(".InputfieldRepeaterAddLink:not(.InputfieldRepeaterAddLinkInit)", $inputfieldRepeater)
.addClass('InputfieldRepeaterAddLinkInit')
.click(eventAddLinkClick);

File diff suppressed because one or more lines are too long