use event namespace

This commit is contained in:
Kevin Matz 2020-12-19 11:08:50 -05:00
parent df05ac5e77
commit 6320be1ec8
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ $( document ).ready( () => {
} );
// link checkbox changes to group enable/disable
$( 'input[type="checkbox"]' ).change( ( e ) => {
$( 'input[type="checkbox"]' ).on( "change.groups", ( e ) => {
$( "input." + $( e.currentTarget ).data( 'group' ) ).prop( 'disabled',
$( e.currentTarget ).data( 'invert' )
? $( e.currentTarget ).prop( 'checked' )
@ -63,7 +63,7 @@ function unpackJson( data, scope = false ) {
if ( elmnt.is( 'input' ) || elmnt.is( 'select' ) ) {
if ( elmnt.prop( 'type' ) == 'checkbox' ) {
elmnt.prop( 'checked', ( value == "1" ) ? true : false );
elmnt.change();
elmnt.trigger( "change.groups" );
} else {
elmnt.val( value );
}