1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 01:34:31 +02:00

Add @rolandtoth PR #16 that triggers showInputfield or hideInputfield events when showing/hiding Inputfields due to dependencies.

This commit is contained in:
Ryan Cramer
2017-01-05 14:46:42 -05:00
parent d785fd7523
commit d4d90a53fe
2 changed files with 3 additions and 1 deletions

View File

@@ -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