httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r560637 - /httpd/mod_mbox/trunk/scripts/site-index.py
Date Sat, 28 Jul 2007 22:40:02 GMT
Author: jerenkrantz
Date: Sat Jul 28 15:40:01 2007
New Revision: 560637

URL: http://svn.apache.org/viewvc?view=rev&rev=560637
Log:
Divide the master list into 3 and add a cute little JS jump-to select bar.

Modified:
    httpd/mod_mbox/trunk/scripts/site-index.py

Modified: httpd/mod_mbox/trunk/scripts/site-index.py
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/trunk/scripts/site-index.py?view=diff&rev=560637&r1=560636&r2=560637
==============================================================================
--- httpd/mod_mbox/trunk/scripts/site-index.py (original)
+++ httpd/mod_mbox/trunk/scripts/site-index.py Sat Jul 28 15:40:01 2007
@@ -19,6 +19,9 @@
     tlps[tlp][list] = path
     count = count + 1
 
+keys = tlps.keys()
+keys.sort()
+
 print """<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -31,15 +34,33 @@
  <body
   bgcolor="#FFFFFF" text="#000000" link="#0000FF"
   vlink="#000080" alink="#FF0000">
+<script type="text/javascript">
+<!--
+function TLP_onchange() {
+document.location.hash = document.forms[0].TLP[document.forms[0].TLP.selectedIndex].value
+}
+-->
+</script>
 <h2>Welcome to the mail archives on mail-archives.apache.org.</h2>
+<form action="" method="get" id="tlpform">
+<table width="100%">
+<tr align="left">
+<i>Jump to a specific top-level archive section: </i>
+<select size="1" name="TLP" onchange="return TLP_onchange()">
+"""
+
+for tlp in keys:
+    print "<option value=\"%s\">%s</option>" % (tlp, tlp)
+
+print """
+</select>
+</form>
 <table width="100%">
 <tr valign="top"><td>
 <ul>
 """
-keys = tlps.keys()
-keys.sort()
 i = 0
-split = False
+colcount = 0
 for tlp in keys:
     print "<li><h3><a name='%s'>%s.apache.org lists:</a></h3>"
% (tlp, tlp)
     print "<ul>"
@@ -48,11 +69,11 @@
     for list in klist:
         print "    <li><a href='%s/'>%s@%s.apache.org</a></li>" %
(tlps[tlp][list], list, tlp)
         i = i + 1
+        colcount = colcount + 1
     print "</ul></li>"
-    if (i >= (count/2)) and split == False:
+    if colcount >= count/3:
         print """</ul></td><td><ul>"""
-        split = True
-    
+        colcount = 0
 
 print """
 </ul>



Mime
View raw message