1/*================================== 2= Editar Rol = 3==================================*/ 4$(".btnEditarRol").click(function(){ 5 6var idRol = $(this).attr("idRol"); 7 8 9var datos = new FormData(); 10datos.append("idRol", idRol); 11 12$.ajax({ 13url:"ajax/rol.ajax.php", 14method:"POST", 15data: datos, 16cache: false, 17contentType: false, 18processData: false, 19dataType:"json", 20success: function(respuesta){ 21 $("#EditarRol").val(respuesta["nombre"]); 22 $("#EditarRolid").val(respuesta["id"]); 23 24 25 console.log("respuesta", respuesta); 26} 27 28 29}); 30 31 32}) 33 34$(".btnVerRol").click(function(){ 35 36var idRol = $(this).attr("idRol"); 37 38 39var datos = new FormData(); 40datos.append("idRol", idRol); 41 42$.ajax({ 43url:"ajax/rol.ajax.php", 44method:"POST", 45data: datos, 46cache: false, 47contentType: false, 48processData: false, 49dataType:"json", 50success: function(respuesta){ 51 52 $("#VerRol").val(respuesta["nombre"]); 53 54 55 //console.log("respuesta", respuesta); 56} 57 58 59}); 60 61 62}) 63 64/*======================================= 65= Activar Rol = 66=======================================*/ 67 68 69$(".btnActivarRoles").click(function(){ 70 71 72var idRol = $(this).attr("idRol"); 73var estadoRol = $(this).attr("estadoRol"); 74//console.log("idModulo", sstadoModulo); 75 76var datos = new FormData(); 77datos.append("idRolAc", idRol); 78datos.append("estadoRol", estadoRol); 79 80 81$.ajax({ 82url:"ajax/rol.ajax.php", 83method:"POST", 84data: datos, 85cache: false, 86contentType: false, 87processData: false, 88dataType:"json", 89success: function(respuesta){ 90 91 92} 93 94 95}); 96 97if (estadoRol==0) { 98 99 $(this).removeClass('btn-success'); 100 $(this).addClass('btn-danger'); 101 $(this).html('Desactivado'); 102 $(this).attr("estadoRol",1); 103 104 105} 106else{ 107 $(this).removeClass('btn-danger'); 108 $(this).addClass('btn-success'); 109 $(this).html('Activado'); 110 $(this).attr("estadoRol",0); 111 112 113} 114 115 116}) 117 118
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.