mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 15:57:01 +02:00
Add @rolandtoth PR #16 that triggers showInputfield or hideInputfield events when showing/hiding Inputfields due to dependencies.
This commit is contained in:
@@ -437,6 +437,7 @@ function InputfieldDependencies($target) {
|
||||
if($fieldToShow.is('.InputfieldStateHidden')) {
|
||||
// field is hidden so show/fade in
|
||||
$fieldToShow.removeClass('InputfieldStateHidden').fadeIn();
|
||||
$(document).trigger('showInputfield');
|
||||
numVisibilityChanges++;
|
||||
consoleLog('Field is now visible.');
|
||||
} else {
|
||||
@@ -447,6 +448,7 @@ function InputfieldDependencies($target) {
|
||||
// hide it
|
||||
if(!$fieldToShow.is('.InputfieldStateHidden')) {
|
||||
$fieldToShow.addClass('InputfieldStateHidden').hide();
|
||||
$(document).trigger('hideInputfield', $fieldToShow);
|
||||
consoleLog('Field is now hidden.');
|
||||
numVisibilityChanges++;
|
||||
} else {
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user