GoalModelEditor/FrontEnd/public/js/dashboard.js
/**
 * Function to add click eventListener to 'rename-template' class
 */
Function to add click eventListener to 'rename-template' class
Function to add click eventListener to ' rename - template ' class
function addClickOnRenameTemplate() {
    $(".rename-template").click(evt => {
        evt.stopImmediatePropagation();
        let parentNode = null;
        if ($(evt.target).hasClass("template")) {
            parentNode = evt.target;
        } else {
            parentNode = $(evt.target).parents(".template")[0];
        }
        setTID($(parentNode).attr("id"));
        let templateName = $(parentNode).find(".template_name").eq(0).html();
        putTemplateNameInModal(templateName);
    });
}
function addClickOnRenameTemplate ( ) { $ ( ".rename-template" ) . click ( evt => { evt . stopImmediatePropagation ( ) ; let parentNode = null ; if ( $ ( evt . target ) . hasClass ( "template" ) ) { parentNode = evt . target ; } else { parentNode = $ ( evt . target ) . parents ( ".template" ) [ 0 ] ; } setTID ( $ ( parentNode ) . attr ( "id" ) ) ; let templateName = $ ( parentNode ) . find ( ".template_name" ) . eq ( 0 ) . html ( ) ; putTemplateNameInModal ( templateName ) ; } ) ; }
Function to add click eventListener to 'rename-template' class
Function to add click eventListener to ' rename - template ' class