<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<!-- jQuery library -->
<!-- <script src="//code.jquery.com/jquery-3.6.0.js"></script> -->
- <!-- <script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
+ <!-- <script src="//code.jquery.com/ui/3.6.0/jquery-ui.js"></script> -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
//if ( node.data.class ~ "EFC_SIMP" )
// if ( node.title === "param1" ) {
if (node.data.classeAccas == "MCSIMP") {
- $tdList.eq(3).html("<simp><input type='input' class='form-control-sm' id='simp1' placeholder='"+node.data.wValue+"' value='"+node.data.wValue+"'></simp>");
- $tdList.eq(3).css('color','black') //td
-//KO: $tdList.eq(3).find(">input").css('color','black')
+// $tdList.eq(3).html("<simp><input type='input' class='form-control-sm' id='simp1' placeholder='"+node.data.wValue+"' value='"+node.data.wValue+"'></simp>");
+ $tdList.eq(3).html("<form class='was-validated'><div class='form-group'><input type='input' class='form-control-sm' id='simp1' placeholder='"+node.data.wValue+"' value='"+node.data.wValue+"' required><div class='valid-feedback'>Valid.</div><div class='invalid-feedback'>Please fill out this field.</div></div></form>");
+//$tdList.eq(3).css('color','black') //td
+ $tdList.eq(3).find("input").css('color','black')
<!-- $tdList.eq(3).html("<simp>"+node.data.wValue+"</simp>"); -->
}
},
},
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);
$.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",