CVS: tmda-cgi PendList.py,1.16,1.17

Jim Ramsay <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv1059

Modified Files:
	PendList.py 
Log Message:
Added ability for even-odd row different colours in pending list (not implemented in current theme, yet, but it works)


Index: PendList.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/PendList.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- PendList.py	13 May 2003 22:25:29 -0000	1.16
+++ PendList.py	22 May 2003 17:05:57 -0000	1.17
@@ -122,6 +122,8 @@
     LastMsg = len(Msgs)
   if len(Msgs):
     T["DispRange"] = "%d-%d of %d" % (FirstMsg + 1, LastMsg, len(Msgs))
+    # TODO: page numbering
+    T["PageRange"] = "n of x"
 
     # Grey out the first & prev buttons?
     if FirstMsg == 0:
@@ -153,7 +155,8 @@
       T["LastButt2"] = """<img src="%(ThemeDir)s/buttons/subnav_r1_c13.gif"
 width="18" height="18" alt="Last">"""
   else:
-    T["DispRange"] = ""
+    T["DispRange"] = "0"
+    T["PageRange"] = "1 of 1"
 
   # Update session
   PVars["Pager"] = FirstMsg
@@ -194,12 +197,18 @@
   Row          = T["Row"]
   InProcessRow = T["InProcessRow"]
   InProcess    = T["InProcess"]
+  EvenRowColor = T["EvenRowColor"]
+  OddRowColor  = T["OddRowColor"]
   if len(Msgs):
     # Add rows for messages if there are any
     Count = 0
     InProcMsg = ""
     for Msg in Msgs[FirstMsg:LastMsg]:
       T["MsgID"] = Msg
+      if Count % 2 == 0:
+        T["RowBgColor"] = OddRowColor
+      else:
+        T["RowBgColor"] = EvenRowColor
 
       # Print a single message record inside list loop
       try:

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.