Merge branch 'master' of git+ssh://db.debian.org/git/userdir-ldap-cgi
authorMartin Zobel-Helas <zobel@debian.org>
Wed, 13 Jun 2012 20:45:51 +0000 (22:45 +0200)
committerMartin Zobel-Helas <zobel@debian.org>
Wed, 13 Jun 2012 20:45:51 +0000 (22:45 +0200)
* 'master' of git+ssh://db.debian.org/git/userdir-ldap-cgi:
  And a changelog entry for Nick's change
  Use the changes@ address consistently in preference to change@
  Try a different CreateCryptSalt approach

Conflicts:
debian/changelog

debian/changelog
debian/control
debian/links [new file with mode: 0644]
debian/rules
html/debdb.css
html/hostinfo.wml
html/template/header.wml
machines.cgi

index db1b911..842f5df 100644 (file)
@@ -1,4 +1,7 @@
-userdir-ldap-cgi (0.3.37) Xnstable; urgency=low
+userdir-ldap-cgi (0.3.37) UNRELEASED; urgency=low
+
+  [ Martin Zobel-Helas ]
+  * use libjs-jquery-tablesorter to sort machines.cgi
 
   [ Nick Mathewson ]
   * Use the changes@ address consistently in preference to change@.
index a23c033..f1dcc71 100644 (file)
@@ -8,8 +8,52 @@ Uploaders: Peter Palfrader <weasel@debian.org>, Stephen Gran <sgran@debian.org>,
 
 Package: userdir-ldap-cgi
 Architecture: all
-Depends: userdir-ldap, perl5, libnet-ldap-perl, libcrypt-blowfish-perl, gnupg (>= 1.0.3), libdate-manip-perl, liburi-perl, libio-socket-ssl-perl, libossp-uuid-perl, libdigest-hmac-perl, python, python-crack | python-cracklib, cracklib-runtime, libcrypt-passwdmd5-perl
-Recommends: wamerican, wamerican-large, wamerican-small, wbritish, wbritish-large, wbritish-small, wbulgarian, wcanadian, wcanadian-large, wcanadian-small, wcatalan, wdanish, wdutch, wfaroese, wfinnish, wfrench, wgalician-minimos, witalian, wngerman, wnorwegian, wogerman, wpolish, wspanish, wswedish, wswiss, wukrainian
+Depends: userdir-ldap,
+       perl5,
+       libcrypt-blowfish-perl,
+       libcrypt-passwdmd5-perl,
+       libdate-manip-perl,
+       libdigest-hmac-perl,
+       libio-socket-ssl-perl,
+       libnet-ldap-perl,
+       libossp-uuid-perl,
+       liburi-perl
+       ,
+       gnupg (>=1.0.3)
+       ,
+       python,
+       python-crack | python-cracklib
+       ,
+       cracklib-runtime
+       ,
+       libjs-jquery,
+       libjs-jquery-tablesorter
+Recommends: wamerican,
+       wamerican-large,
+       wamerican-small,
+       wbritish,
+       wbritish-large,
+       wbritish-small,
+       wbulgarian,
+       wcanadian,
+       wcanadian-large,
+       wcanadian-small,
+       wcatalan,
+       wdanish,
+       wdutch,
+       wfaroese,
+       wfinnish,
+       wfrench,
+       wgalician-minimos,
+       witalian,
+       wngerman,
+       wnorwegian,
+       wogerman,
+       wpolish,
+       wspanish,
+       wswedish,
+       wswiss,
+       wukrainian
 Replaces: userdir-ldap
 Description: CGI programs for the db.debian.org
  These programs are run on http://db.debian.org/ to simplify the
diff --git a/debian/links b/debian/links
new file mode 100644 (file)
index 0000000..4c96adb
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/share/javascript/jquery var/www/userdir-ldap/js/jquery
+/usr/share/javascript/jquery-tablesorter var/www/userdir-ldap/js/jquery-tablesorter
+/usr/share/javascript/jquery-metadata var/www/userdir-ldap/js/jquery-metadata
index 50b8352..454da0a 100755 (executable)
@@ -56,6 +56,8 @@ binary-indep: build
 
        install -m 644 apache-config.txt $(i)/usr/share/doc/$(package)
 
+       dh_link
+
        dh_installchangelogs
        dh_installcron
        dh_fixperms --exclude=web-cookies
index 57d73cc..ba99d0f 100644 (file)
@@ -24,3 +24,20 @@ td.center {
 h1.h1class {
     text-align: center;
 }
+
+table           { border-collapse: separate; border-spacing: 1px; }
+
+table.tablesorter {
+font-size: 100%;
+text-align: center;
+}
+
+table.tablesorter th {
+    padding: 2px;
+    text-align: center;
+    vertical-align: middle;
+}
+table.tablesorter tbody td {
+    padding: 2px;
+    vertical-align: middle;
+}
index f815f9e..24c2b3e 100644 (file)
@@ -1,8 +1,5 @@
 #use wml::db.d.o title="debian.org Developer Machines"
 
-#<table border=1 width="100%">
-#<tr valign="top">
-#<td width="20%" align="center">
 <b>Lookup:</b><br>
 <form method="post" action="machines.cgi">
 <select name=host>
@@ -11,14 +8,9 @@
 </select>
 <input type=submit value="Go">
 </form>
-#</td>
-#<td>
-#&nbsp;<br>
 <hr>
 ~hostdetails~
 <br>
-#</td>
-#</tr></table>
 
 <p>
 <a href="http://people.debian.org/~joey/misc/naming.html">Debian Host Naming Scheme</a>\
index eb8479e..8213247 100644 (file)
   <meta name="Modified"  content="$(WML_GEN_ISOTIME)" />
 {#style#}
 {#style#:
+ <link type="text/css" href="/js/jquery-tablesorter/themes/blue/style.css" rel="stylesheet" />
+ <link type="text/css" href="/js/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.css" rel="stylesheet" />
+
 <link href="$(DBHOME)/debian.css" rel="stylesheet" type="text/css" />
 <link href="/debdb.css" rel="stylesheet" type="text/css" />
 
 <link href="/debian-$(CUR_ISO_LANG).css" rel="stylesheet" type="text/css" media="all"/>
 :#style#}
+
+ <script language="javascript" type="text/javascript" src="/js/jquery/jquery.js"></script>
+ <script language="javascript" type="text/javascript" src="/js/jquery-metadata/jquery.metadata.js"></script>
+ <script language="javascript" type="text/javascript" src="/js/jquery-tablesorter/jquery.tablesorter.js"></script>
+ <script language="javascript" type="text/javascript" src="/js/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js"></script>
+       <script type="text/javascript">
+       $(function() {
+               $("#machines").tablesorter({widthFixed: true, widgets: ['zebra']})
+               $(".sort").removeAttr("href")
+       });
+
+       </script>
 </head>
 <body>
index ba84f18..f01d4e1 100755 (executable)
@@ -127,6 +127,7 @@ my $host = lc($query->param('host'));
 my $sortby = lc($query->param('sortby')) || "host";
 my $sortorder = lc($query->param('sortorder')) || "asc";
 
+
 &Util::HTMLSendHeader;
 $ldap = Net::LDAP->new($config{ldaphost}) || &Util::HTMLError($!);
 &Util::UpgradeConnection($ldap) unless $config{usessl} eq 'False';
@@ -211,19 +212,19 @@ if ($output{havehostdata}) {
 } else {
   # display summary info
   $hostdetails = "<h1>Summary</h1>\n";
-  $hostdetails .= "<table class=\"debform\" border=\"1\" width=\"90%\">\n<tr>";
+  $hostdetails .= "<table id=\"machines\" class=\"tablesorter\" border=\"1\" cellpadding=\"0\" cellspacing=\"1\">\n<thead>\n<tr>";
   foreach $key (@summaryorder) {
     if ($sortby ne $key) {
-      $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
+      $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
     } else {
       if ($sortorder ne "dsc") {
-        $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=dsc\">$summaryattrs{$key}</a></th>";
+        $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=dsc\">$summaryattrs{$key}</a></th>";
       } else {
-        $hostdetails .= "<th><a href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
+        $hostdetails .= "<th><a class=\"sort\" href=\"machines.cgi?sortby=$key&sortorder=asc\">$summaryattrs{$key}</a></th>";
       }
     }
   }
-  $hostdetails .= "</tr>\n";
+  $hostdetails .= "</tr>\n</thead>\n<tbody>\n";
   
   my @sorted;
   if ($sortorder eq "asc") {
@@ -239,7 +240,7 @@ if ($output{havehostdata}) {
     }
     $hostdetails .= "</tr>\n";
   }
-  $hostdetails .= "</table>\n";
+  $hostdetails .= "</tbody>\n</table>\n";
 }
 
 # Finally, we can write the output... yuck...