소스 검색

Continuation of fixing the alternating row colors in addressbook:
this code is present at 3 different places...

Thijs Kinkhorst 21 년 전
부모
커밋
5c651578ab
2개의 변경된 파일10개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 2
      src/addrbook_search.php
  2. 5 2
      src/addrbook_search_html.php

+ 5 - 2
src/addrbook_search.php

@@ -136,9 +136,12 @@ function display_result($res, $includesource = true) {
     echo "</tr>\n";
     
     while (list($undef, $row) = each($res)) {
-        $tr_bgcolor = '';
         $email = htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES);
-        if ($line % 2) { $tr_bgcolor = $color[0]; }
+        if ($line % 2) { 
+            $tr_bgcolor = $color[12];
+        } else {
+            $tr_bgcolor = $color[4];
+        }
         echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) .
         html_tag( 'td',
              '<small><a href="javascript:to_address(' . 

+ 5 - 2
src/addrbook_search_html.php

@@ -111,9 +111,12 @@ if ($javascript_on) {
     echo "</tr>\n";
 
     foreach ($res as $row) {
-        $tr_bgcolor = '';
         $email = AddressBook::full_address($row);
-        if ($line % 2) { $tr_bgcolor = $color[0]; }
+        if ($line % 2) { 
+            $tr_bgcolor = $color[12];
+        } else {
+            $tr_bgcolor = $color[4];
+        }
         if ($squirrelmail_language == 'ja_JP')
             {
         echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) .