use event namespace
This commit is contained in:
parent
df05ac5e77
commit
6320be1ec8
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue