noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 62/107: #1316: Notes tableau de bord - pas de


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 62/107: #1316: Notes tableau de bord - pas de limite ou choix.
Date: Mon, 26 Aug 2019 10:31:58 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 550e74dee083115be4b5ac04e723218491497fc4
Author: Dany De Bontridder <address@hidden>
Date:   Tue Jul 30 23:19:03 2019 +0200

    #1316: Notes tableau de bord - pas de limite ou choix.
---
 html/js/todo_list.js              | 11 +++++++++--
 include/ajax/ajax_todo_list.php   | 10 +++++-----
 include/class/todo_list.class.php |  2 +-
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/html/js/todo_list.js b/html/js/todo_list.js
index 09510c4..7c1292f 100644
--- a/html/js/todo_list.js
+++ b/html/js/todo_list.js
@@ -69,6 +69,7 @@ function todo_list_show(p_id)
                             remove_waiting_node();
                             content.evalScripts();
                             Effect.SlideDown(todo_div, {duration: 0.1, 
direction: 'top-left'})
+                            
document.getElementById('todo_form_'+p_id)['p_desc'].scrollTop=0;
                         }
                         catch (e)
                         {
@@ -110,15 +111,21 @@ function todo_list_remove(p_ctl)
         return false;
     });
 }
+/**
+ * Save the content of a todo note
+ * @param {type} p_form the form containing date, test , ...
+ *
+ */
 function todo_list_save(p_form)
 {
     try {
     var form=$('todo_form_'+p_form);
     var json=form.serialize(true);
+    document.getElementById('todo_form_'+p_form)['p_desc'].scrollTop=0;
     json['op']="todo_list";
     new Ajax.Request('ajax_misc.php',
                     {
-                        method:'get',
+                        method:'post',
                        parameters:json,
                        onSuccess:function (req) {
                            // On success : reload the correct row and close 
@@ -131,7 +138,7 @@ function todo_list_save(p_form)
                             if (tl_id.length == 0)
                             {
                                 var rec = req.responseText;
-                                alert_box('erreur :' + rec);
+                                alert_box(content[48] + rec);
                             }
                             if ( getNodeText(tl_id[0]) == '0') {
                                 smoke.alert('Note est vide');
diff --git a/include/ajax/ajax_todo_list.php b/include/ajax/ajax_todo_list.php
index 430014b..7e11a26 100644
--- a/include/ajax/ajax_todo_list.php
+++ b/include/ajax/ajax_todo_list.php
@@ -97,7 +97,7 @@ if ($ac == 'save')
     
     $cn=Dossier::connect();
     $todo=new Todo_List($cn);
-     $id=$http->get("id","string", 0);
+     $id=$http->post("id","string", 0);
     $todo->set_parameter("id",$id);
     if ($id <> 0 ) { $todo->load(); }
     else
@@ -105,10 +105,10 @@ if ($ac == 'save')
         $todo->set_parameter("owner", $_SESSION['g_user']);
     }
     
-    $todo->set_parameter("date",$http->get("p_date_todo","string", ""));
-    $todo->set_parameter("title", $http->get("p_title","string", ""));
-    $todo->set_parameter("desc", $http->get("p_desc","string", ""));
-    $todo->set_is_public($http->get("p_public", "string","N"));
+    $todo->set_parameter("date",$http->post("p_date_todo","string", ""));
+    $todo->set_parameter("title", $http->post("p_title","string", ""));
+    $todo->set_parameter("desc", $http->post("p_desc","string", ""));
+    $todo->set_is_public($http->post("p_public", "string","N"));
     
     ob_start();
     if ( $todo->get_parameter('owner') == $_SESSION['g_user'] ) $todo->save();
diff --git a/include/class/todo_list.class.php 
b/include/class/todo_list.class.php
index 112f3a1..ea3b1dc 100644
--- a/include/class/todo_list.class.php
+++ b/include/class/todo_list.class.php
@@ -88,7 +88,7 @@ class Todo_List
         }
         if ( strcmp ($p_idx, 'tl_desc') == 0 )
         {
-            $p_value=mb_substr($p_value,0,400) ;
+            $p_value=mb_substr($p_value,0,1000) ;
             return true;
         }
         return true;



reply via email to

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