GoalModelEditor/FrontEnd/public/js/projectEdit/projectEdit.js
/**
 * delete goal by pressing "delete" image
 * @param event
 */
delete goal by pressing "delete" image
@param event
delete goal by pressing " delete " image @param event
function deleteGoalInList(element) {
    let parent = element.parentNode;
    let grandparent = parent.parentNode;
    if (grandparent.childNodes.length > 1) {
        grandparent.removeChild(parent);
        event.preventDefault();
    }
    if (grandparent.childNodes.length === 1) {
        $(element.parentNode).children("input").val("");
        $(element.parentNode).children("input").css("font-weight", "bold");
    }
}
function deleteGoalInList ( element ) { let parent = element . parentNode ; let grandparent = parent . parentNode ; if ( grandparent . childNodes . length > 1 ) { grandparent . removeChild ( parent ) ; event . preventDefault ( ) ; } if ( grandparent . childNodes . length === 1 ) { $ ( element . parentNode ) . children ( "input" ) . val ( "" ) ; $ ( element . parentNode ) . children ( "input" ) . css ( "font-weight" , "bold" ) ; } }
delete goal by pressing "delete" image
 @param event
delete goal by pressing " delete " image @param event
//make the default enter invalid // if parent not null, delete child //if this is the only goal left, clear the goal content //console.log(event.target);