1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 16:54:44 +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') { if(source == 'InputfieldRepeaterItemEdit' || source == 'InputfieldRepeaterItemAdd') {
event.stopPropagation(); event.stopPropagation();
var $r = $(this).find(".InputfieldRepeater"); var $r = $(this).find(".InputfieldRepeater");
if($r.length) initRepeater($r); if($r.length) $r.each(function() { initRepeater($(this)) });
return; return;
} }
} }
@@ -743,6 +743,7 @@ function InputfieldRepeater($) {
initSortable($inputfieldRepeater, $inputfields); initSortable($inputfieldRepeater, $inputfields);
// setup the add links // setup the add links
console.log($inputfieldRepeater);
$(".InputfieldRepeaterAddLink:not(.InputfieldRepeaterAddLinkInit)", $inputfieldRepeater) $(".InputfieldRepeaterAddLink:not(.InputfieldRepeaterAddLinkInit)", $inputfieldRepeater)
.addClass('InputfieldRepeaterAddLinkInit') .addClass('InputfieldRepeaterAddLinkInit')
.click(eventAddLinkClick); .click(eventAddLinkClick);

File diff suppressed because one or more lines are too long