GoalModelEditor/FrontEnd/public/js/dashboard.js
/**
 * Function to add click eventListener to 'rename-model' class
 */
Function to add click eventListener to 'rename-model' class
Function to add click eventListener to ' rename - model ' class
function addClickOnRenameModel() {
    $(".rename-model").click(evt => {
        evt.stopImmediatePropagation();
        let parentNode = null;
        if ($(evt.target).hasClass("model")) {
            parentNode = evt.target;
        } else {
            parentNode = $(evt.target).parents(".model")[0];
        }
        setMID($(parentNode).attr("id"));
        let modelName = $(parentNode).find(".model_name").eq(0).html();
        putModelNameInModal(modelName);
    })
}
function addClickOnRenameModel ( ) { $ ( ".rename-model" ) . click ( evt => { evt . stopImmediatePropagation ( ) ; let parentNode = null ; if ( $ ( evt . target ) . hasClass ( "model" ) ) { parentNode = evt . target ; } else { parentNode = $ ( evt . target ) . parents ( ".model" ) [ 0 ] ; } setMID ( $ ( parentNode ) . attr ( "id" ) ) ; let modelName = $ ( parentNode ) . find ( ".model_name" ) . eq ( 0 ) . html ( ) ; putModelNameInModal ( modelName ) ; } ) }
Function to add click eventListener to 'rename-model' class
Function to add click eventListener to ' rename - model ' class