[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 11/12: Ajout fonction logout si déconnecté e
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 11/12: Ajout fonction logout si déconnecté en ajax |
Date: |
Sat, 29 Nov 2014 16:15:37 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 49e45b13c88aaed391d1dae9e60ae7eac1a57b44
Author: Dany De Bontridder <address@hidden>
Date: Sat Nov 29 14:06:15 2014 +0100
Ajout fonction logout si déconnecté en ajax
---
html/js/scripts.js | 16 +++++++++++++++-
include/ac_common.php | 2 +-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 3b4c4c4..7f2d2ae 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -1958,7 +1958,8 @@ function display_task(p_id)
}}
);
$(p_id).style.top = posY+'px';
- $(p_id).style.left = posX+'px';
+ $(p_id).style.left = "10%";
+ $(p_id).style.width= "80%";
$(p_id).style.display = 'block';
}
@@ -2634,4 +2635,17 @@ function unselect_other_tab(p_tab)
} catch(e) {
if ( console ) console.log(e.message);
}
+}
+/**
+ * logout function call from ajax
+ * @see ajax_disconnected
+ * @returns {undefined}
+ */
+function logout()
+{
+ var tmp_place = window.location.href
+ var tmp_b=tmp_place.split('/')
+ var tmp_last=tmp_b.length-1
+ var place_logout=tmp_place.replace(tmp_b[tmp_last],'logout.php');
+ window.location.href=place_logout;
}
\ No newline at end of file
diff --git a/include/ac_common.php b/include/ac_common.php
index 55eb551..200f0db 100644
--- a/include/ac_common.php
+++ b/include/ac_common.php
@@ -784,8 +784,8 @@ function ajax_disconnected($div)
$html.=h2(_('Données non disponibles'), 'class="title"
style="width:auto"');
$html.=h2(_('Veuillez vous reconnecter'), 'class="error"');
$html.=alert(_("Déconnecté"), true);
+ $html.="<script>logout();</script>";
$html = escape_xml($html);
-
header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
- [Noalyss-commit] [noalyss] branch master updated (6ac6388 -> 5f767a4), Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 02/12: Task #1056 - Grand livre et plusieurs exercices comptables, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 03/12: Task #1056 - Grand livre et plusieurs exercices comptables, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 09/12: Task #1057 - Impression poste sur plusieurs exercices Utilisation code journal (PDF) et nom journal (CSV), Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 04/12: print font too small, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 06/12: Task #1057 - Impression poste sur plusieurs exercices Utilisation code journal (PDF) et nom journal (CSV), Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 07/12: Task #1045 - Amélioration apparence : Utiisation icon search, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 11/12: Ajout fonction logout si déconnecté en ajax,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 10/12: Bouton tinybutton, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 05/12: Task #1057 - Impression poste sur plusieurs exercices Impression poste et fiche sur plusieurs exercices (PDF & CSV), Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 12/12: Task #1045 - Amélioration apparence : Bouton tinybutton, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 08/12: Task #1045 - Amélioration apparence : Bug : classe non utilisée, Dany De Bontridder, 2014/11/29
- [Noalyss-commit] [noalyss] 01/12:, Dany De Bontridder, 2014/11/29