noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 35/219: Task #0001415: Lettrage - masquer la


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 35/219: Task #0001415: Lettrage - masquer la mise en évidence. Click a second time of an reconciliation and the highlight disappear
Date: Mon, 18 Dec 2017 13:22:33 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 40184268fdb409f151e8b693fb368e47ab20da10
Author: Dany De Bontridder <address@hidden>
Date:   Sun Sep 3 16:56:03 2017 +0200

    Task #0001415: Lettrage - masquer la mise en évidence.
    Click a second time of an reconciliation and the highlight
    disappear
---
 html/js/acc_ledger.js | 24 ++++++++++++++++--------
 html/test.php         |  6 ++++++
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 4cbc790..13d8811 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -1109,11 +1109,12 @@ function  get_history_account(ctl, dossier) {
     }
 }
 var previous = [];
+var let_previous="";
 function show_reconcile(p_div, p_let)
 {
     try
     {
-        if (previous.length != 0)
+        if (previous.length != 0 || p_let == let_previous )
         {
             var count_elt = previous.length;
             var i = 0;
@@ -1125,14 +1126,21 @@ function show_reconcile(p_div, p_let)
         }
         var name = 'tr_' + p_let + '_' + p_div;
         var elt = document.getElementsByName(name);
-        previous = elt;
-        var count_elt = elt.length;
-        var i = 0;
-        for (i = 0; i < count_elt; i++) {
-            elt[i].style.backgroundColor = '#000066';
-            elt[i].style.color = 'white';
-            elt[i].style.fontWeight = 'bolder';
+        if ( p_let != let_previous )  {
+            
+            previous = elt;
+            var count_elt = elt.length;
+            var i = 0;
+            for (i = 0; i < count_elt; i++) {
+                elt[i].style.backgroundColor = '#000066';
+                elt[i].style.color = 'white';
+                elt[i].style.fontWeight = 'bolder';
 
+            }
+            let_previous=p_let;
+        }
+        else {
+                let_previous="";
         }
 
     } catch (e)
diff --git a/html/test.php b/html/test.php
index e8dacc7..41c0b0b 100644
--- a/html/test.php
+++ b/html/test.php
@@ -36,6 +36,12 @@ require_once ('class/dossier.class.php');
 require_once('lib/html_input.class.php');
 require_once ('lib/function_javascript.php');
 require_once 'class/user.class.php';
+require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
+
+global $http;
+
+$http=new HttpInput();
+
 load_all_script();
 $gDossier=HtmlInput::default_value_get('gDossier', -1);
 if ($gDossier==-1)



reply via email to

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