1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Combined two "opened" event handlers in InputfieldImage.js into one

This commit is contained in:
Ryan Cramer
2023-01-19 07:45:04 -05:00
parent 45c85311b3
commit 6e4cfb9d03
2 changed files with 9 additions and 7 deletions

View File

@@ -2351,13 +2351,15 @@ function InputfieldImage($) {
$newTab.find(".InputfieldImage").each(function() {
initInputfield($(this));
});
}).on('opened', '.InputfieldImage', function() {
//console.log('InputfieldImage opened');
initInputfield($(this));
}).on('opened', function() {
$(this).find(".InputfieldImage").each(function() {
initInputfield($(this));
});
var $t = $(this);
if($t.hasClass('InputfieldImage')) {
initInputfield($t);
} else {
$t.find('.InputfieldImage').each(function() {
initInputfield($(this));
});
}
});
}

File diff suppressed because one or more lines are too long