Cambio entre portales (portal del cliente)

This commit is contained in:
2020-09-26 16:09:32 -07:00
parent b971b9da22
commit c60179f2b2
6 changed files with 325 additions and 181 deletions

View File

@@ -21,6 +21,17 @@
#GvPermisosComandos tr td:nth-child(n+3), #GVNotificaciones tr th:nth-child(n+2) {
width: 50px;
}
.CustomSpinner {
position: fixed;
background-image: url(/Imagenes/Loading.gif);
background-repeat: no-repeat, repeat;
background-size: contain;
top: 60px;
right: 25px;
z-index: 500000;
height: 40px;
width: 40px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -430,6 +441,7 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="CustomSpinner" style="display: none;"></div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
@@ -440,30 +452,34 @@
let myTick = 0
$('body').on('keyup', '#TxtEmail ', function (e) {
changeUser();
});
function changeUser() {
let Tick = myTick + 1;
myTick = Tick;
myTick = Tick;
setTimeout(
function () {
if (myTick == Tick) {
function () {
if (myTick == Tick) {
myTick = 0;
let Tusuario = $('#TxtEmail').val();
if (TusuarioOld != Tusuario) {
if (TusuarioOld != Tusuario) {
$('.CustomSpinner').show();
TusuarioOld = Tusuario
//console.log(Tusuario)
$.ajax({
$.ajax({
url: "/Ashx/SIGWeb.ashx",
data: { usuario: Tusuario, metodo: 'GetUser' }
data: { usuario: Tusuario, metodo: 'GetUser' }
}).done(function (data) {
//console.log(data)
if (data == "1") {
$('#BtnCambiarUsuario').click()
}
if (data == "1") {
$('#BtnCambiarUsuario').click()
} else {
$('.CustomSpinner').hide();
}
});
}
}
}, 2000);
});
}
}
}, 500);
}
function ADSBegin() {
TusuarioOld = $('#TxtEmail').val()