Revision 49

Date:
2008/10/28 19:10:16
Author:
dpavlin
Revision Log:
Unroll radio buttons into table by first letter of repository.

Much more readable and easier to navigate
Files:

Legend:

 
Added
 
Removed
 
Modified
  • svn/index.cgi

     
    52 52 my $onChange = qq{document.getElementById('current_repository').submit();};
    53 53 # we want to activete javascript magic refresh after we hit submit for the first time, and not always
    54 54 $onChange = '' unless $q->param('did_submit');
    55 my $first_letter = substr($repositories[0],0,1);
    55 56 return (
    56 57 $q->start_form( -name => 'current_repository', -id => 'current_repository', -method => 'post' ),
    57 58 "From repository ",
    58 59 $q->param('did_submit') ?
    59 60 $q->popup_menu( -name => 'repository', -values => [ @repositories ], -onChange => $onChange ) :
    60 $q->radio_group( -name => 'repository', -values => [ @repositories ], -onChange => $onChange ), # , -linebreak => 'true' ),
    61 "<table><tr><th>$first_letter</th><td>" . join( '', map {
    62 my $delimiter = '';
    63 if ( substr($_,0,1) ne $first_letter ) {
    64 $first_letter = substr($_,0,1);
    65 $delimiter = "</td></tr>\n<tr><th>$first_letter</th><td>";
    66 }
    67 $delimiter . $q->radio_group( -name => 'repository', -values => [ $_ ] )
    68 } @repositories ) . "<td></tr></table>",
    69 #$q->radio_group( -name => 'repository', -values => [ map { "$_, " } @repositories ], -onChange => $onChange ), # , -linebreak => 'true' ),
    61 70 " show ",
    62 71 $q->popup_menu( -name => 'limit', -values => [ qw/100 500 1000 5000 10000/ ], -onChange => $onChange ),
    63 72 " revisions and ",