app/js/tree_logic.js
// Writes tree json to backup tree file of a workspace
Writes tree json to backup tree file of a workspace
Writes tree json to backup tree file of a workspace
function treeToBackupJson(workspace) {
    console.log("tree to json called: " + workspace);
    treeJson = $('#' + workspace + '_tree').tree('toJson');
    fs.writeFile(appDataPath + "/workspace_repo/" + workspace + "/tree_backup.json", treeJson, (err) => {
        if (err) {
            alert("An error ocurred updating the file" + err.message);
            console.log(err);
            return;
        }
        console.log("The tree backup json has been succesfully written: " + workspace);
    });
}
function treeToBackupJson ( workspace ) { console . log ( "tree to json called: " + workspace ) ; treeJson = $ ( '#' + workspace + '_tree' ) . tree ( 'toJson' ) ; fs . writeFile ( appDataPath + "/workspace_repo/" + workspace + "/tree_backup.json" , treeJson , ( err ) => { if ( err ) { alert ( "An error ocurred updating the file" + err . message ) ; console . log ( err ) ; return ; } console . log ( "The tree backup json has been succesfully written: " + workspace ) ; } ) ; }
Writes tree json to backup tree file of a workspace
Writes tree json to backup tree file of a workspace
// Gets tree json of current workspace tree // Writes to tree_backup.json