const message = "The server says " + data.message +" , id: "+id;
const msgerror = "Event updateNodeInfo : can't find node with key :"+id;
const tree = $.ui.fancytree.getTree(_treeCssSelStr);
-
+
+ console.log("------------- message : "+ message);
treeMessage(_msgCssSelStr,"alert-info",message);
const node=tree.getNodeByKey(id);
if (node == null) {
treeMessage(_msgCssSelStr,"alert-danger",msgerror);
return;
- };
- Object.assign(node.data,info); //merge new options to node.data
+ };
+ console.log("------------- message 2a: "+ node.data.title);
+ console.log("------------- message 2b: "+ info.title);
+ // En fait, il faut que fancytree trie les propriétés qui l'interesse de celles qui vont dans data
+ // Object.assign(node.data,info); //merge new options to node.data
+ node.fromDict(info);
+ console.log("------------- message 2c: "+ node.data.title);
node.render(true,false); //force rendering the node (not parents nor descendants)
//node.renderStatus(); //CSS element updates only
}, false);