noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 05/06: Task #1385: Alternance lignes non res


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/06: Task #1385: Alternance lignes non respectée Corrige sorttable_ordered + enleve blacktriangle Surligne les lignes odd/even
Date: Sat, 25 Mar 2017 13:19:52 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 687888ed324e0b621bfd4ab50898c39be2c34fae
Author: Dany De Bontridder <address@hidden>
Date:   Sat Mar 25 18:09:17 2017 +0100

    Task #1385: Alternance lignes non respectée
    Corrige sorttable_ordered + enleve blacktriangle
    Surligne les lignes odd/even
---
 html/js/sorttable.js             | 17 +++++++++++++++--
 include/ajax/ajax_navigator.php  |  2 +-
 include/class/class_fiche.php    |  2 +-
 include/compta_fin_rec.inc.php   |  3 ++-
 include/compta_fin_saldo.inc.php |  2 +-
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/html/js/sorttable.js b/html/js/sorttable.js
index 036e728..d2de7e5 100644
--- a/html/js/sorttable.js
+++ b/html/js/sorttable.js
@@ -190,12 +190,25 @@ sorttable = {
                     for (var j = 0; j < row_array.length; j++) {
                         tb.appendChild(row_array[j][1]);
                     }
-
                     delete row_array;
+                    // Highlight odd and even rows properly
+                    sorttable.highlight_body(this);
                 });
             }
         }
     },
+    highlight_body:function(p_heading) {
+         var p_table=p_heading.parentNode.parentNode.parentNode;
+         var nb_row=p_table.rows;
+         var e=0;
+         for (e=1;e<nb_row.length;e++) {
+             if (e % 2 == 0 ) {
+                 if ( nb_row[e].className=="odd"  ) nb_row[e].className="even";
+             } else {
+                 if ( nb_row[e].className=="even" ) nb_row[e].className="odd";
+             }
+         }
+    },
     guessType: function (table, column) {
         // guess the type of a column based on its first non-blank row
         sortfn = sorttable.sort_alpha;
@@ -273,7 +286,7 @@ sorttable = {
     },
     reverse: function (tbody) {
         // reverse the rows in a tbody
-        newrows = [];
+        var newrows = [];
         for (var i = 0; i < tbody.rows.length; i++) {
             newrows[newrows.length] = tbody.rows[i];
         }
diff --git a/include/ajax/ajax_navigator.php b/include/ajax/ajax_navigator.php
index e64c3cd..1347154 100644
--- a/include/ajax/ajax_navigator.php
+++ b/include/ajax/ajax_navigator.php
@@ -46,7 +46,7 @@ $a_menu=$cn->get_array($sql,array($_SESSION['g_user']));
             <th class='sorttable_sorted'>
                 Code AD 
                 <?php echo HtmlInput::infobulle(34); ?>
-                <span 
id="sorttable_sortfwdind">&nbsp;&blacktriangledown;</span>
+                <span id="sorttable_sortfwdind">&nbsp<img 
src="image/up.gif"></span>
             </th>
             <th>
                 <?php echo _("Chemin");?>
diff --git a/include/class/class_fiche.php b/include/class/class_fiche.php
index 062daeb..820f9b5 100644
--- a/include/class/class_fiche.php
+++ b/include/class/class_fiche.php
@@ -1600,7 +1600,7 @@ class Fiche
             <TR >
             <TH>'._('Quick Code').HtmlInput::infobulle(17).'</TH>'.
             '<th>'._('Poste comptable').'</th>'.
-            '<th  class="sorttable_sorted_reverse">'._('Nom').'<span 
id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>'.'</th>
+            '<th  class="sorttable_sorted">'._('Nom').'<span 
id="sorttable_sortfwdind"><img src="image/up.gif"></span>'.'</th>
             <th>'._('Adresse').'</th>
             <th style="text-align:right">'._('Total débit').'</th>
             <th style="text-align:right">'._('Total crédit').'</th>
diff --git a/include/compta_fin_rec.inc.php b/include/compta_fin_rec.inc.php
index 966458a..795d461 100644
--- a/include/compta_fin_rec.inc.php
+++ b/include/compta_fin_rec.inc.php
@@ -232,7 +232,8 @@ echo '<span style="display:block">';
 
        echo '</span>';
 echo '<table id="t_rec_bk" class="sortable" style="width:90%;margin-left:5%">';
-$r ='<th class=" sorttable_sorted_reverse">'.'Date 
'.HtmlInput::infobulle(17).'<span 
id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>'.'</th>';
+
+$r ='<th class=" sorttable_sorted">'.'Date '.HtmlInput::infobulle(17).'<span 
id="sorttable_sortfwdind"><img src="image/up.gif"></span>'.'</th>';
 $r.=th('Libellé');
 $r.=th('N° interne');
 $r.=th('Montant', ' style="text-align:right"');
diff --git a/include/compta_fin_saldo.inc.php b/include/compta_fin_saldo.inc.php
index 378c347..10276ac 100644
--- a/include/compta_fin_saldo.inc.php
+++ b/include/compta_fin_saldo.inc.php
@@ -37,7 +37,7 @@ require_once  
NOALYSS_INCLUDE.'/class/class_acc_parm_code.php';
     echo dossier::hidden();
     echo _('Cherche').' : '.HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3', 
'1');
     echo '<table class="sortable"  style="margin-left:10%;width:80%" 
class="result" id="fin_saldo_tb">';
-    echo tr(th('Quick Code',' class=" 
sorttable_sorted_reverse"',HtmlInput::infobulle(17).'<span 
id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>')
+    echo tr(th('Quick Code',' class=" 
sorttable_sorted"',HtmlInput::infobulle(17).'<span 
id="sorttable_sortfwdind"><img src="image/up.gif"></span>')
             .th('Compte en banque',' style="text-align:left"')
             .th('Journal',' style="text-align:center"')
             .th('Description',' style="text-align:center"')



reply via email to

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