js/ka-ui.js
/**
     * Makes handler function for the required / disallowed elements checkbox
     * When checked, that code element type gets added to the specified list.
     * @param {Object[]} The code elements list to add/remove elements from.
     * @param {string} The code element type to add/remove (eg. 'IfStatement')
     * @param {Object} The JQuery object for the checkbox
     */
Makes handler function for the required / disallowed elements checkbox
When checked, that code element type gets added to the specified list.
@param {Object[]} The code elements list to add/remove elements from.
@param {string} The code element type to add/remove
@param {Object} The JQuery object for the checkbox
Makes handler function for the required / disallowed elements checkbox When checked that code element type gets added to the specified list . @param { Object [] } The code elements list to add / remove elements from . @param { string } The code element type to add / remove @param { Object } The JQuery object for the checkbox
function makeElementsCheckboxHandler(elements, elementType, checkbox) {
        return function () {
            var elementIdx = elements.indexOf(elementType);
            if (checkbox.is(':checked')) {
                if (elementIdx === -1) {
                    elements.push(elementType);
                }
            } else {
                if (elementIdx !== -1) {
                    elements.splice(elementIdx, 1);
                }
            }
            validate();
        };
    }
function makeElementsCheckboxHandler ( elements , elementType , checkbox ) { return function ( ) { var elementIdx = elements . indexOf ( elementType ) ; if ( checkbox . is ( ':checked' ) ) { if ( elementIdx === - 1 ) { elements . push ( elementType ) ; } } else { if ( elementIdx !== - 1 ) { elements . splice ( elementIdx , 1 ) ; } } validate ( ) ; } ; }
Makes handler function for the required / disallowed elements checkbox
 When checked, that code element type gets added to the specified list.
Makes handler function for the required / disallowed elements checkbox When checked that code element type gets added to the specified list .