From 14f4ac42ac31c5714f35cfba665a3d975f0ef46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garcia=20Nu=C3=B1ez?= Date: Sat, 21 Dec 2019 12:56:04 +0100 Subject: [PATCH] =?UTF-8?q?Quitado=20c=C3=B3digo=20Javascript,=20retoques?= =?UTF-8?q?=20en=20el=20layout.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1.sources/MyHealth/docroot/header.xhtml | 29 ++++++------------- 1.sources/MyHealth/docroot/home.xhtml | 13 ++------- 1.sources/MyHealth/docroot/login.xhtml | 17 ----------- .../docroot/profile/RegisterUser.xhtml | 21 +------------- .../docroot/profile/UpdateProfile.xhtml | 25 ++-------------- 5 files changed, 16 insertions(+), 89 deletions(-) diff --git a/1.sources/MyHealth/docroot/header.xhtml b/1.sources/MyHealth/docroot/header.xhtml index 02bed27..5ad7f6d 100644 --- a/1.sources/MyHealth/docroot/header.xhtml +++ b/1.sources/MyHealth/docroot/header.xhtml @@ -9,26 +9,13 @@ MyHealth Online Services + - function handleLoginRequest(xhr, status, args) { - if(args.validationFailed || !args.loggedIn) { - PF('dlgLogin').jq.effect("shake", {times:5}, 100); - PF('btnLogin').enable(); - } - else { - PF('btnLogin').enable(); - PF('dlgLogin').hide(); - } - } - - function startLogin() { - PF('btnLogin').disable(); - } - - function onAjaxError() { - alert('Ajax error'); - } + // Si hay un error AJAX, lo más probable es que la sesión expirase, vamos a la página de error + function onAjaxError() { + window.location.href = "#{request.contextPath}/error.xhtml?type=expired"; + } @@ -39,10 +26,12 @@