PageSourceSearch

https://netixcloud.com/scripts/CtaManager.js

js netixcloud.com collected 2026-10-06 09:28:19 UTC 2,786 bytes, 94 lines download raw bytes

1
2var CtaManagerLateral = function (parametros) {
3    that = this;
4
5	that.padre = parametros.padre;
6	that.idDivCta = parametros.idDivCallToAction;
7	that.idModalFrm = parametros.idModalFrm;
8	that.idDivCtaFooter = parametros.idDivCallToActionFooter;
9	that.urlEnvioMail = parametros.UrlSendMail;
10	that.IdentificadorOrigen = parametros.Origen;
11	that.idDivFrm = parametros.IdDivFrm;
12
13	that.trigerMostrar = parametros.MargenMostrar ? parametros.MargenMostrar : 500;
14
15	var lastScrollTop = 0;
16	var ctaVisible = false;
17	$(window).scroll(function (event) {
18		var st = $(this).scrollTop();
19		if (st > lastScrollTop) {
20			// downscroll code
21			if (st > that.trigerMostrar && !ctaVisible) {
22				$("#" + that.idDivCta).slideDown();
23				ctaVisible = true;
24			}
25		} else {
26			// upscroll code
27		}
28		lastScrollTop = st;
29	});
30
31	that.padre.ocultarCta = function () {
32		$("#"+that.idDivCta).slideUp();
33	}
34	that.padre.ocultarCtaFooter = function () {
35		$("#" + that.idDivCtaFooter).slideUp();
36	}
37	that.padre.muestraFrmCtaContact = function () {
38		$("#" + that.idModalFrm).modal("show");
39	}
40
41
42	that.padre.ctaNombre = ko.observable("");
43	that.padre.ctaTlf = ko.observable("");
44	that.padre.ctaEmpresa = ko.observable("");
45	that.padre.ctaCargo = ko.observable("");
46	that.padre.EnableBtnFrmCtaSendMail = ko.observable(true);
47	that.padre.ctaChkAcepta = ko.observable(false);
48
49	that.padre.EnviarCta = function (data,element) {
50		that.padre.EnableBtnFrmCtaSendMail(false);
51		if (ko.unwrap(that.padre.ctaNombre) && ko.unwrap(that.padre.ctaTlf)) {
52		} else {
53			that.padre.EnableBtnFrmCtaSendMail(true);
54			return;
55		}
56		var form_data = new FormData();
57		form_data.append("nombre", ko.unwrap(that.padre.ctaNombre));
58		form_data.append("telefono", ko.unwrap(that.padre.ctaTlf));
59		form_data.append("empresa", ko.unwrap(that.padre.ctaEmpresa));
60		form_data.append("cargo", ko.unwrap(that.padre.ctaCargo));
61		form_data.append("entrada", ko.unwrap(that.IdentificadorOrigen));
62		form_data.append("acepta", ko.unwrap(that.padre.ctaChkAcepta));
63		
64		var url = that.urlEnvioMail;
65		if (url) {
66			$.ajax({
67				cache: false,
68				contentType: false,
69				data: form_data,
70				enctype: 'multipart/form-data',
71				processData: false,
72				method: 'post',
73				url: url,
74				success: function (respuesta) {
75					console.log(respuesta);
76					if (respuesta.IsOk) {
77						console.log("Respuesta SI esOk");
78						$("#" + that.idDivFrm).modal("hide");
79						that.padre.ocultarCta();
80						that.padre.ocultarCtaFooter();
81						that.padre.EnableBtnFrmCtaSendMail(true);
82						window.location = respuesta.Redirect;
83					} else {
84						that.padre.EnableBtnFrmCtaSendMail(true);
85						console.log("Respuesta NO esOk");
86					}
87}
88			});
89		}
90	}
91
92
93};
94

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.