From: Eric Fayolle Date: Tue, 26 Oct 2021 15:03:25 +0000 (+0200) Subject: Essai champ valide/invalide X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef5d72b946ec2055273262f492899c01f8e395e5;p=tools%2Feficas.git Essai champ valide/invalide --- diff --git a/testFlask/templates/base.html b/testFlask/templates/base.html index 65df47a8..3dfe9e13 100644 --- a/testFlask/templates/base.html +++ b/testFlask/templates/base.html @@ -12,7 +12,7 @@ - + diff --git a/testFlask/templates/commandes_2.html b/testFlask/templates/commandes_2.html index affad4b5..4d5ab161 100644 --- a/testFlask/templates/commandes_2.html +++ b/testFlask/templates/commandes_2.html @@ -205,9 +205,10 @@ return {{ mcTraiteJson|tojson }}; //if ( node.data.class ~ "EFC_SIMP" ) // if ( node.title === "param1" ) { if (node.data.classeAccas == "MCSIMP") { - $tdList.eq(3).html(""); - $tdList.eq(3).css('color','black') //td -//KO: $tdList.eq(3).find(">input").css('color','black') +// $tdList.eq(3).html(""); + $tdList.eq(3).html("
Valid.
Please fill out this field.
"); +//$tdList.eq(3).css('color','black') //td + $tdList.eq(3).find("input").css('color','black') } }, @@ -224,6 +225,7 @@ return {{ mcTraiteJson|tojson }}; }, defaultGridAction: function( event, data ) { var node = data.node + input=$(node.tr).find('input') // Called when ENTER is pressed in cell-mode. // Return false to prevent default console.log("event.type, data :"+event.type+" , "+data); @@ -238,7 +240,7 @@ return {{ mcTraiteJson|tojson }}; $.ajax({ type: "POST", url: "{{ url_for('updateSimp') }}", - data: JSON.stringify({id: node.key, data:45 }), + data: JSON.stringify({id: node.key, data:input.val() }), // data: JSON.stringify({id: 5}), contentType: "application/json; charset=utf-8", dataType: "json",