noalyss-commit
[Top][All Lists]
Advanced

[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"?>



reply via email to

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