function updateEnabled(settingId) {
    let current;
    settingsData.some((setting) => {
        current = setting.data.find((data) => {
            return data.id === settingId;
        });
        return current !== undefined;
    });
    if (current === undefined) {
        return;
    }
    if (current.enables === undefined) {
        return;
    }
    else {
        for (let enableId of current.enables) {
            if ($("#" + current.id).prop("checked") && !$("#" + current.id).parent().parent().hasClass("disabled")) {
                $("#" + enableId).parent().parent().removeClass("disabled");
            }
            else {
                $("#" + enableId).parent().parent().addClass("disabled");
            }
            updateEnabled(enableId);
        }
    }
}
// Updates the enabled checkboxes, checks each node recursively
Updates the enabled checkboxes, checks each node recursively
Updates the enabled checkboxes checks each node recursively
function updateEnabled(settingId) {
    let current;
    settingsData.some((setting) => {
        current = setting.data.find((data) => {
            return data.id === settingId;
        });
        return current !== undefined;
    });
    if (current === undefined) {
        return;
    }
    if (current.enables === undefined) {
        return;
    }
    else {
        for (let enableId of current.enables) {
            if ($("#" + current.id).prop("checked") && !$("#" + current.id).parent().parent().hasClass("disabled")) {
                $("#" + enableId).parent().parent().removeClass("disabled");
            }
            else {
                $("#" + enableId).parent().parent().addClass("disabled");
            }
            updateEnabled(enableId);
        }
    }
}
function updateEnabled ( settingId ) { let current ; settingsData . some ( ( setting ) => { current = setting . data . find ( ( data ) => { return data . id === settingId ; } ) ; return current !== undefined ; } ) ; if ( current === undefined ) { return ; } if ( current . enables === undefined ) { return ; } else { for ( let enableId of current . enables ) { if ( $ ( "#" + current . id ) . prop ( "checked" ) && ! $ ( "#" + current . id ) . parent ( ) . parent ( ) . hasClass ( "disabled" ) ) { $ ( "#" + enableId ) . parent ( ) . parent ( ) . removeClass ( "disabled" ) ; } else { $ ( "#" + enableId ) . parent ( ) . parent ( ) . addClass ( "disabled" ) ; } updateEnabled ( enableId ) ; } } }
Updates the enabled checkboxes, checks each node recursively
Updates the enabled checkboxes checks each node recursively