GoalModelEditor/FrontEnd/public/js/dashboard.js
/**
 * Function to add click eventListener to 'project_header' class
 * To show all the models and change the collapse button style
 */
Function to add click eventListener to 'project_header' class
To show all the models and change the collapse button style
Function to add click eventListener to ' project_header ' class To show all the models and change the collapse button style
function addClickOnProject() {
    $(".project_header").click(evt => {
        removeAllClicked();
        let parentNode = null;
        if ($(evt.target).hasClass("project")) {
            parentNode = evt.target;
        } else {
            parentNode = $(evt.target).parents(".project")[0];
        }
        setPID($(parentNode).attr("id"));
        addProjectClicked($(parentNode).find(".project_header")[0]);
        changeFolderStyle($(parentNode).find(".folder-icon")[0]);
        changeCollapseStyle($(parentNode).find(".collapse-btn")[0]);
        $("#models_" + getPID()).collapse('toggle');
        if ($("#models_" + getPID() + " .model")[0] === undefined) {
            $("#add_" + getPID()).popover('toggle');
            $(".overlay").show();
        }
    });
}
function addClickOnProject ( ) { $ ( ".project_header" ) . click ( evt => { removeAllClicked ( ) ; let parentNode = null ; if ( $ ( evt . target ) . hasClass ( "project" ) ) { parentNode = evt . target ; } else { parentNode = $ ( evt . target ) . parents ( ".project" ) [ 0 ] ; } setPID ( $ ( parentNode ) . attr ( "id" ) ) ; addProjectClicked ( $ ( parentNode ) . find ( ".project_header" ) [ 0 ] ) ; changeFolderStyle ( $ ( parentNode ) . find ( ".folder-icon" ) [ 0 ] ) ; changeCollapseStyle ( $ ( parentNode ) . find ( ".collapse-btn" ) [ 0 ] ) ; $ ( "#models_" + getPID ( ) ) . collapse ( 'toggle' ) ; if ( $ ( "#models_" + getPID ( ) + " .model" ) [ 0 ] === undefined ) { $ ( "#add_" + getPID ( ) ) . popover ( 'toggle' ) ; $ ( ".overlay" ) . show ( ) ; } } ) ; }
Function to add click eventListener to 'project_header' class
 To show all the models and change the collapse button style
Function to add click eventListener to ' project_header ' class To show all the models and change the collapse button style
// Show/unfold the model list