#687: Don't lose authentication when editing a long mail
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 23 Jun 2007 08:39:22 +0000 (08:39 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 23 Jun 2007 08:39:22 +0000 (08:39 +0000)
 ChangeLog                 |    1 +
 templates/emails/send.tpl |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1865 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
templates/emails/send.tpl

index 3ebad65..9df6514 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ Bug/Wish:
         - #678: PlUpload filename detection                                -FRU
 
     * Emails:
+        - #687: Don't lose authentication when editing a long mail         -FRU
         - #688: From name in the sending form                              -FRU
 
     * Profile:
index 4165d11..042879f 100644 (file)
     return true;
   }
 
+  var doAuth = true;
+  function _keepAuth() {
+    doAuth = true;
+  }
+
+  function keepAuth() {
+    if (doAuth) {
+      Ajax.update_html(null, "login", null);
+      doAuth = false;
+      setTimeout("_keepAuth()", 10000);
+    }
+  }
+
   function _move(idFrom, idTo) {
     var from = document.getElementById(idFrom);
     var to   = document.getElementById(idTo);
         <input type="submit" name="submit" value="Envoyer" />
       </div>
     </div>
-    <textarea name='contenu' rows="30" cols="75" id="mail_text">
+    <textarea name='contenu' rows="30" cols="75" id="mail_text" onkeyup="keepAuth()">
 {$smarty.request.contenu}
 {if !$smarty.request.contenu}
 --