From: Eric Fayolle Date: Tue, 19 Mar 2024 15:35:40 +0000 (+0100) Subject: Première gestion eid pour les events X-Git-Tag: V_demo_28_mars_2024~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25c9837ec26b4d3b210fd9852c82f6c85d94f0fa;p=tools%2Feficas.git Première gestion eid pour les events --- diff --git a/Web/mdm3.py b/Web/mdm3.py index bf9f8ede..72714750 100755 --- a/Web/mdm3.py +++ b/Web/mdm3.py @@ -204,9 +204,10 @@ def removeNode(): # Parse the JSON into a Python dictionary req = request.get_json() # Print the dictionary - if debug : print("Flask/removeNode ",req);print("/removeNode ",req['id']); + if debug : print("Flask/removeNode ",req);print("/removeNode ",req['eId'],req['id']); + eId = req['eId']; id = req['id']; - (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],session['externEditorId']) + (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],eId) if codeErreur : print ('il faut faire qqchose') ret,message = eficasEditor.removeNode(session['canalId'],session['externEditorId'],id); @@ -229,13 +230,13 @@ def appendChild(): req = request.get_json() # Print the dictionary if debug : print(__file__+"Flask/appendChild : ",req); - id=req['id'];name=req['name'];pos=req['pos']; + eId = req['eId'];id=req['id'];name=req['name'];pos=req['pos']; # id, value = req.values() # Dangereux correspondance implicite #rId,message,changeDone = eficasEditor.appendChild(id,name,pos); (eficasEditor, codeErreur, message) = eficasAppli.getWebEditorById(session['canalId'],session['externEditorId']) if codeErreur : print ('il faut faire qqchose') - (newId, codeErreur, message) = eficasEditor.appendChild(session['canalId'],session['externEditorId'],id,name,pos); + (newId, codeErreur, message) = eficasEditor.appendChild(session['canalId'],eId,id,name,pos); if debug : print (__file__+"Flask/appendChild : newId : ",newId); return make_response(json.dumps( {'id':newId} )) #TODO: Code Erreur @@ -291,7 +292,7 @@ def newDataset(): fancyTreeDict=eficasEditor.getDicoForFancy(eficasEditor.tree.racine) #TODO: changer le nom Dico en Dict #fancyTreeJS=json.dumps([fancyTreeDict],indent=4) #TODO : remove indent if not DEBUG - + fancyTreeDict['eId']=editorId; #print("---- myFancyTreeDico ----") pprint(fancyTreeDict) #print("---- myFancyTreeJS ----")