PageSourceSearch

https://saycontgt.com/vistas/js/unidad.js

js saycontgt.com collected 2026-10-04 06:46:50 UTC 1,711 bytes, 100 lines download raw bytes

1/*====================================
2=            llenar Input            =
3====================================*/
4
5
6$(".btnEditarUnidad").click(function(){
7
8var idUnidad = $(this).attr("idUnidad"); 
9//console.log("idUnidad", idUnidad); 
10
11var datos = new FormData(); 
12datos.append("idUnidad", idUnidad); 
13
14$.ajax({
15url:"ajax/unidad.ajax.php", 
16method:"POST", 
17data: datos, 
18cache: false,
19contentType: false,
20processData: false, 
21dataType:"json", 
22success: function(respuesta){
23
24
25 
26	 $("#EditarNombreUni").val(respuesta["nombre"]); 
27	  $("#EditarIdUni").val(respuesta["id"]); 
28		 $("#idEmpresa").val(respuesta["idEmpresa"]); 
29
30
31
32	//console.log("respuesta", respuesta); 
33} 
34
35
36});
37
38
39})
40
41
42/*=======================================
43=            	Activar Unidad           =
44=======================================*/
45
46
47$(".btnActivarUnidad").click(function(){
48
49
50var idUnidad = $(this).attr("idUnidad"); 
51var estadoUnidad = $(this).attr("estadoUnidad"); 
52//console.log("idModulo", sstadoModulo); 
53
54var datos = new FormData(); 
55datos.append("idUnidadAc", idUnidad); 
56datos.append("estadoUnidad", estadoUnidad);
57
58
59$.ajax({
60url:"ajax/unidad.ajax.php", 
61method:"POST", 
62data: datos, 
63cache: false,
64contentType: false,
65processData: false, 
66dataType:"json", 
67success: function(respuesta){
68
69
70 
71	 //  $("#VerNombreModulo").val(respuesta["nombre"]); 
72
73
74
75	//console.log("respuesta", respuesta); 
76} 
77
78
79});
80
81if (estadoUnidad==0) {
82
83		$(this).removeClass('btn-success'); 
84		$(this).addClass('btn-danger'); 
85		$(this).html('Desactivado'); 
86		$(this).attr("estadoUnidad",1); 
87
88
89}
90else{
91	$(this).removeClass('btn-danger'); 
92		$(this).addClass('btn-success'); 
93		$(this).html('Activado'); 
94		$(this).attr("estadoUnidad",0); 
95
96
97}
98
99
100})

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.