From: Eric Fayolle Date: Mon, 18 Mar 2024 16:17:55 +0000 (+0100) Subject: Ajout de la gestion des arbres dans des tabs bootstrap X-Git-Tag: V_demo_28_mars_2024~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aacfd574954485f4bf5e00f599468e3a2da2fac6;p=tools%2Feficas.git Ajout de la gestion des arbres dans des tabs bootstrap --- diff --git a/Web/mdm3.py b/Web/mdm3.py index f8cdf46d..f0ba8c1f 100755 --- a/Web/mdm3.py +++ b/Web/mdm3.py @@ -256,10 +256,10 @@ def newDataset(): req = request.get_json() # Print the dictionary print(__file__+"/newDataset : ",req); - cataFile =req['catalogName']; - dataSeFile =req['datasetName']; - cataFile = os.path.abspath('../Codes/WebTest/cata_essai.py') - dataSetFile = os.path.abspath('../Codes/WebTest/web_tres_simple_avec_2Fact.comm') + cataFile =os.path.abspath("./data/"+req['catalogName']); + dataSetFile =os.path.abspath("./data/"+req['datasetName']); + # cataFile = os.path.abspath('../Codes/WebTest/cata_essai.py') + # dataSetFile = os.path.abspath('../Codes/WebTest/web_tres_simple_avec_2Fact.comm') else: # The request body wasn't JSON so return a 400 HTTP status code return "Request was not JSON", 400 @@ -293,7 +293,7 @@ def newDataset(): #fancyTreeJS=json.dumps([fancyTreeDict],indent=4) #TODO : remove indent if not DEBUG #print("---- myFancyTreeDico ----") - #pprint(myFancyTreeDico) + pprint(fancyTreeDict) #print("---- myFancyTreeJS ----") #pprint( myFancyTreeJS) commands = eficasEditor.getListeCommandes(); #TODO: Renommer la fonction @@ -306,6 +306,7 @@ def newDataset(): @app.route('/') def index(): + # Example : # tree4Fancy = """ [ # {"title": "Node 1", "key": "1"}, # {"title": "Folder 2", "key": "2", "folder": true, "children": [ @@ -316,22 +317,10 @@ def index(): # """.replace('\n','') print ('_______________________________________________') - #(canalId, codeErreur, message) = eficasAppli.getSessionId() - #debug=1 - #if not codeErreur : - # session['canalId'] = canalId - # if debug : print (' enrolement de session : ', canalId) - #else : - # afficheMessage(message, 'red') - # if not(eficasEditor) : - # return render_template('commandes_2.html', - # titre='Pb a l enrolement ', - # listeCommandes = [], - # tree= None - # ) cataFile = os.path.abspath('../Codes/WebTest/cata_essai.py') dataSetFile = os.path.abspath('../Codes/WebTest/web_tres_simple_avec_2Fact.comm') - # En attendant la partie Eric + + # En attendant la génération d'un n° de canal unique # notion de plage global _no _no = _no + 1 @@ -579,6 +568,9 @@ def get_file(filename): if __name__ == "__main__": app.run(host="localhost", port=8321, debug=True) + + + #$("#386bc28a2ff811ec853cac220bca9aa6").html('Essai') # $("#550f63502b6611ecab61ac220bca9aa6").hover(function(){ diff --git a/Web/templates/commandes_2.html b/Web/templates/commandes_2.html index 1b2391e7..80d9213f 100644 --- a/Web/templates/commandes_2.html +++ b/Web/templates/commandes_2.html @@ -122,20 +122,22 @@