const IDIOMAS_PREFERIDOS = ["es-MX", "es-US", "es-ES", "es_US", "es_ES"];
var habilitarLupa=false;
Ext.onReady(inicializar);
function inicializar()
{
habilitarLupa=gE('mostrarLupa').value=='1';
var arrDimensiones=obtenerDimensionesNavegador();
if(window.location.href!=window.parent.location.href)
{
obtenerVentanaPadre(window,location.href);
}
if(gE('totalPublicaciones').value!='0')
{
$('#carousel').infiniteCarousel (
{
imagePath:'../Scripts/infiniteCarousel/images/',
autoPilot :true
}
);
}
if(habilitarLupa)
{
showLupa();
}
cargaVocesTTL();
if(gE('altoContraste').value=='0')
{
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/lupaBarra.png',
width:40,
height:40,
cls:'btnSIUGJCancel',
id:'btnGuardarForm',
renderTo:'btn1',
handler:function()
{
habilitarLupaSitio();
}
}
)
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/brilloContraste.png',
width:40,
height:40,
cls:'btnSIUGJCancel',
id:'btnGuardarForm',
renderTo:'btn2',
handler:function()
{
cambiarContraste();
}
}
)
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/altavoz.png',
cls:'btnSIUGJCancel',
width:40,
height:40,
id:'btnGuardarForm',
renderTo:'btn3',
handler:function()
{
getSelectedText();
}
}
)
}
else
{
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/lupaBarra_0.png',
width:36,
height:36,
cls:'btnSIUGJ',
id:'btnGuardarForm',
renderTo:'btn1',
handler:function()
{
habilitarLupaSitio();
}
}
)
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/brilloContraste_0.png',
width:36,
height:36,
cls:'btnSIUGJ',
id:'btnGuardarForm',
renderTo:'btn2',
handler:function()
{
cambiarContraste();
}
}
)
new Ext.Button (
{
icon:'../principalPortal/imagesSIUGJ/altavoz_0.png',
cls:'btnSIUGJ',
width:36,
height:36,
id:'btnGuardarForm',
renderTo:'btn3',
handler:function()
{
getSelectedText();
}
}
)
}
}
var idLupa;
function showLupa()
{
mE('magnify_glass');
$(".magnify").jfMagnify();
idLupa=setInterval(function(){refrescarMagnify();},2000);
window.scrollTo(0, 0);
}
function ocultaLupa()
{
oE('magnify_glass');
clearInterval(idLupa);
$(".magnify").data("jfMagnify").destroy();
}
function refrescarMagnify()
{
$(".magnify").data("jfMagnify").updateZone();
}
var vocesDisponibles=[];
var vozDefault=null;
function cargaVocesTTL()
{
if (!'speechSynthesis' in window)
return alert("Lo siento, tu navegador no soporta esta tecnología");
const cargarVoces = () => {
if (vocesDisponibles.length > 0)
{
return;
}
vocesDisponibles = speechSynthesis.getVoices();
var a;
var encontrado=false;
var x;
for(a=0;a'+arrResp[0]);
}
}
obtenerDatosWebV2('../paginasFunciones/funciones.php',funcAjax, 'POST','funcion=8&d='+d+'&l='+l+'&p='+p,true);
}
function ocultarError(evt)
{
oE('lblErr1');
oE('lblErr2');
var key= evt.which;
if(Ext.isIE)
key=evt.keyCode;
if(key==13)
{
autenticar();
return;
}
if(event.target.id=='')
{
gE(event.target.name).value=event.target.value+String.fromCharCode(key);
}
}
function mostrarPantallaRegistro()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.url='../modulosEspeciales_SGJ/registroUsuario.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaRecuperar()
{
var form = new Ext.form.FormPanel(
{
baseCls: 'x-plain',
layout:'absolute',
defaultType: 'label',
items: [
{
x:10,
y:10,
xtype:'label',
html:'Ingrese la dirección de correo electrónico con la cual se registró: *'
},
{
x:10,
y:50,
xtype:'label',
html:'Correo Electrónico: *'
},
{
x:200,
y:45,
xtype:'textfield',
width:320,
height:45,
cls:'controlSIUGJ',
id:'email'
},
{
xtype:'button',
x:550,
y:45,
height:30,
width:140,
id:'btnAceptar',
disabled:false,
text:'Recuperar',
cls:'btnSIUGJ',
width:160,
handler:function()
{
recuperarDatosAcceso();
}
}
]
}
);
var ventanaAM = new Ext.Window(
{
id:'vRecuperar',
title: 'Recuperar Contraseña',
width: 800,
height:210,
cls:'msgHistorialSIUGJ',
layout: 'fit',
plain:true,
closable:false,
modal:true,
bodyStyle:'padding:5px;',
buttonAlign:'center',
items: form,
listeners : {
show : {
buffer : 10,
fn : function()
{
gEx('email').focus(false,500);
}
}
},
buttons: [
{
text: 'Cancelar',
cls:'btnSIUGJCancel ',
width:160,
handler:function()
{
ventanaAM.close();
}
}
]
}
);
ventanaAM.show();
/*var obj={};
obj.ancho='100%';
obj.alto='90%';
obj.url='../modulosEspeciales_SGJ/recuperarDatosAcceso.php';
abrirVentanaFancy(obj);*/
}
function mostrarPantallaSoporteUsuarioExterno()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../modulosEspeciales_SIUGJ/tblRegistrarIncidenteSoporteUsuarioExterno.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaSoporte()
{
var obj={};
obj.ancho='100%';
obj.alto='90%';
obj.url='https://soporte.siugj.com/marketplace/formcreator/front/formdisplay.php?id=3';
/*abrirVentanaFancy(obj);*/
abrirVentana(obj.url);
}
function mostrarVentana2FA(iU,pR)
{
var form = new Ext.form.FormPanel(
{
baseCls: 'x-plain',
layout:'absolute',
defaultType: 'label',
items: [
{
x:10,
y:15,
cls:'SIUGJ_Etiqueta',
html:'Ingrese el Código de Acceso:'
},
{
x:280,
y:10,
cls:'controlSIUGJ',
id:'txtCodigoAcceso',
xtype:'textfield',
width:110,
enableKeyEvents :true,
listeners: {
keypress:function(txt,e)
{
if((txt.getValue().length+1)>6)
{
e.stopEvent();
}
}
},
autoCreate:{tag: 'input', type: 'text', style:'height:30px;', autocomplete: 'off'}
},
{
x:90,
y:65,
cls:'SIUGJ_Etiqueta',
html:'Reenviar Código de Acceso'
}
]
}
);
var ventanaAM = new Ext.Window(
{
title: 'Código de Acceso',
width: 500,
height:200,
layout: 'fit',
plain:true,
modal:true,
bodyStyle:'padding:5px;',
buttonAlign:'center',
cls:'msgHistorialSIUGJ',
items: form,
listeners : {
show : {
buffer : 10,
fn : function()
{
gEx('txtCodigoAcceso').focus(false,500);
}
}
},
buttons: [
{
text: 'Cancelar',
cls:'btnSIUGJCancel',
width:140,
handler:function()
{
ventanaAM.close();
}
},
{
text: 'Aceptar',
cls:'btnSIUGJ',
width:140,
handler: function()
{
if(gEx('txtCodigoAcceso').getValue()=='')
{
function resp()
{
gEx('txtCodigoAcceso').focus();
}
msgBox('Debe ingresar el Código de Acceso',resp)
return;
}
function funcAjax(peticion_http)
{
var resp=peticion_http.responseText;
arrResp=resp.split('|');
if(arrResp[0]=='1')
{
if( arrResp[1] =='0')
{
function resp2()
{
gEx('txtCodigoAcceso').focus();
}
msgBox('El Código de Acceso ingresado es Incorrecto',resp2)
return;
}
else
{
location.href=(pR);
ventanaAM.close();
}
}
else
{
msgBox('No se ha podido realizar la operación debido al siguiente problema:'+'
'+arrResp[0]);
}
}
obtenerDatosWebV2('../paginasFunciones/funciones.php',funcAjax, 'POST','funcion=13&cA='+bE(gEx('txtCodigoAcceso').getValue())+'&iU='+bE(iU),true);
}
}
]
}
);
ventanaAM.show();
}
function reenviarCodigoAcceso(iU)
{
function funcAjax(peticion_http)
{
var resp=peticion_http.responseText;
arrResp=resp.split('|');
if(arrResp[0]=='1')
{
msgBox('El Código de Acceso ha sido Enviado de Nuevo');
}
else
{
msgBox('No se ha podido realizar la operación debido al siguiente problema:'+'
'+arrResp[0]);
}
}
obtenerDatosWebV2('../paginasFunciones/funciones.php',funcAjax, 'POST','funcion=12&iU='+iU,true);
}
function mostrarPantallaRegistroIndex()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../modulosEspeciales_SIUGJ/registroUsuario.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaInicio()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../principalPortal/portalInicio.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaValidarDocumento()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../gestorDocumental/validaDocumentos.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaAudiencias()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../reportes/frmReporteSalaCalendario.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaRemates()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../modulosEspeciales_SIUGJ/tblBienes.php';
abrirVentanaFancy(obj);
}
function mostrarPantallaPublicaciones()
{
var obj={};
obj.ancho='100%';
obj.alto='100%';
obj.params=[['cPagina','sFrm=true']];
obj.url='../modulosEspeciales_SIUGJ/tblPublicacionesGenerales.php';
abrirVentanaFancy(obj);
}
function recuperarDatosAcceso()
{
var mail=gEx('email');
if(!validarCorreo(mail.getValue()))
{
function resp1()
{
gEx('email').focus();
}
msgBox('La dirección de correo electrónico ingresada no es válida',resp1);
return;
}
function funcAjax(peticion_http)
{
var resp=peticion_http.responseText;
arrResp=resp.split('|');
switch(arrResp[0])
{
case '1':
function resp3()
{
gEx('vRecuperar').close();
}
msgBox('Sus datos de acceso han sido enviados a la cuenta de correo electrónico registrada',resp3);
return;
break;
/*case '2':
function resp2()
{
gEx('email').focus();
}
msgBox('La dirección de correo electrónico ingresada no se encuentra registrada en el sistema',resp2);
return;
break;*/
default:
msgBox('No se ha podido realizar la operación debido al siguiente problema:'+'
'+arrResp[0]);
break;
}
}
obtenerDatosWebV2('../modulosEspeciales_SGJ/paginasFunciones/funcionesModulosEspeciales_SGJ.php',funcAjax, 'POST','funcion=7&mail='+mail.getValue(),true);
}
function habilitarLupaSitio()
{
gE('mostrarLupa').value=(gE('mostrarLupa').value=='1'?'0':'1');
function funcAjax(peticion_http)
{
var resp=peticion_http.responseText;
arrResp=resp.split('|');
if(arrResp[0]=='1')
{
if(gE('mostrarLupa').value=='0')
ocultaLupa();
else
showLupa();
}
else
{
msgBox('No se ha podido realizar la operación debido al siguiente problema:'+'
'+arrResp[0]);
}
}
obtenerDatosWebV2('../paginasFunciones/funciones.php',funcAjax, 'POST','funcion=15&tipoValor=1&valor='+gE('mostrarLupa').value,true);
}
function cambiarContraste()
{
function funcAjax(peticion_http)
{
var resp=peticion_http.responseText;
arrResp=resp.split('|');
if(arrResp[0]=='1')
{
location.reload();
}
else
{
msgBox('No se ha podido realizar la operación debido al siguiente problema:'+'
'+arrResp[0]);
}
}
obtenerDatosWebV2('../paginasFunciones/funciones.php',funcAjax, 'POST','funcion=15&tipoValor=2&valor='+(gE('altoContraste').value=='1'?'0':'1'),true);
}