noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing oper


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 253/323: ANCPLAN : fix bug when removing operation
Date: Wed, 14 Mar 2018 17:39:00 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 5a1ac80796efd514427191119b21f2a324531490
Author: Dany De Bontridder <address@hidden>
Date:   Sat Feb 24 14:42:17 2018 +0100

    ANCPLAN : fix bug when removing operation
---
 html/js/anc_script.js                 | 7 +++++--
 include/class/anc_operation.class.php | 8 +++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/html/js/anc_script.js b/html/js/anc_script.js
index 397b91d..50d2557 100644
--- a/html/js/anc_script.js
+++ b/html/js/anc_script.js
@@ -338,9 +338,12 @@ function anc_remove_operation(p_dossier, p_oa_group)
                         p_oa_group, "gDossier":
                         p_dossier, "op": "remove_anc"};
             var queryString = encodeJSON(obj);
-            g(p_oa_group).style.display = 'none';
             var e = new Ajax.Request("ajax_misc.php",
-                    {method: 'get', parameters: queryString});
+                    {method: 'get', parameters: queryString,onSuccess:function 
req() {
+                            $("tr"+p_oa_group).remove();
+                    }
+                    
+             });
              
          } else
          {
diff --git a/include/class/anc_operation.class.php 
b/include/class/anc_operation.class.php
index 69f0f98..6e1ecef 100644
--- a/include/class/anc_operation.class.php
+++ b/include/class/anc_operation.class.php
@@ -302,7 +302,13 @@ class Anc_Operation
         {
             $class=($i%2 == 0)?'class="even"':' class="odd"';
             $i++;
-            $ret.="<tr $class>";
+            
+            if ( $oldgroup <> $row['oa_group']) {
+                $oldgroup=$row['oa_group'];
+            }
+            $row_id=sprintf('id="tr%s"',$oldgroup);
+            
+            $ret.="<tr $row_id $class>";
             $ret.=td($row['str_date']);
             $ret.=td(h($row['oa_description']));
             $ret.=td(h($row['jr_pj_number']));



reply via email to

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