noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 02/13: Reconnect if session expired


From: dwm
Subject: [Noalyss-commit] [noalyss] 02/13: Reconnect if session expired
Date: Sun, 28 Jan 2024 09:05:24 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit 0b88b9eb9451fb6836b555800da1b35977d18929
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Jan 27 15:47:04 2024 +0100

    Reconnect if session expired
---
 html/js/acc_ledger.js     | 10 ++++++++++
 html/js/noalyss_script.js |  1 +
 2 files changed, 11 insertions(+)

diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 5952e76b9..9929335ed 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -801,6 +801,8 @@ function view_history_account(p_value, dossier, p_exercice) 
{
             onFailure: error_box,
             onSuccess: function (req, xml) {
                 remove_waiting_box();
+                if (req.responseText === 'NOCONX') { reconnect();return;}
+
                 add_div(popup);
                 success_box(req, xml);
                 $(idbox).style.top = calcy(140 + (layer * 3)) + "px";
@@ -840,6 +842,8 @@ function view_history_anc_account(p_value, dossier, 
p_exercice) {
             onFailure: error_box,
             onSuccess: function (req, xml) {
                 remove_waiting_box();
+                if (req.responseText === 'NOCONX') { reconnect();return;}
+
                 add_div(popup);
                 $(idbox).innerHTML = req.responseText;
                 $(idbox).style.top = calcy(140 + (layer * 3)) + "px";
@@ -874,6 +878,8 @@ function update_history_account(obj) {
                 onFailure: error_box,
                 onSuccess: function (req, xml) {
                     remove_waiting_box();
+                    if (req.responseText === 'NOCONX') { reconnect();return;}
+
                     success_box(req, xml);
                     g(obj.div).style.top = calcy(140 + (layer * 3)) + "px";
                 }
@@ -915,6 +921,8 @@ function view_history_card(p_value, dossier, p_exercice) {
             onFailure: error_box,
             onSuccess: function (req, xml) {
                 remove_waiting_box();
+                if (req.responseText === 'NOCONX') { reconnect();return;}
+
                 add_div(popup);
                 success_box(req, xml);
                 g(idbox).style.top = calcy(140 + (layer * 3)) + "px";
@@ -947,6 +955,8 @@ function update_history_card(obj) {
                 parameters: querystring,
                 onFailure: error_box,
                 onSuccess: function (req, xml) {
+                    if (req.responseText === 'NOCONX') { reconnect();return;}
+
                     remove_waiting_box();
                     success_box(req, xml);
                     g(obj.div).style.top = calcy(140 + (layer * 3)) + "px";
diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index 4e8fdaacf..c70142b90 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -2430,6 +2430,7 @@ function set_preference(p_dossier) {
                     onFailure: ajax_misc_failure,
                     onSuccess: function (req) {
                         remove_waiting_box();
+                        if (req.responseText === 'NOCONX') { 
reconnect();return;}
                         add_div({id: 'preference_div', drag: 1});
                         $('preference_div').innerHTML = req.responseText;
                         try



reply via email to

[Prev in Thread] Current Thread [Next in Thread]