|
From: <jgr...@us...> - 2003-04-15 13:32:43
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv8855
Modified Files:
HTML.pm
Log Message:
Fix minor bug where column headers in History display came out in wrong order, fix some alignment, use > and < instead of + and - for sort order
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -d -r1.128 -r1.129
*** HTML.pm 15 Apr 2003 05:32:13 -0000 1.128
--- HTML.pm 15 Apr 2003 13:32:35 -0000 1.129
***************
*** 2003,2008 ****
@{$self->{history_keys__}} = keys %{$self->{history__}};
}
!
!
# If a sort is specified then use it to sort the history items by an a subkey
# (from, subject or bucket) otherwise use compare_mf to give the history back
--- 2003,2007 ----
@{$self->{history_keys__}} = keys %{$self->{history__}};
}
!
# If a sort is specified then use it to sort the history items by an a subkey
# (from, subject or bucket) otherwise use compare_mf to give the history back
***************
*** 2010,2014 ****
# field we ignore all punctuation characters so that "John and 'John and John
# all sort next to each other
!
# Ascending or Descending? Ascending is noted by /-field/
--- 2009,2013 ----
# field we ignore all punctuation characters so that "John and 'John and John
# all sort next to each other
!
# Ascending or Descending? Ascending is noted by /-field/
***************
*** 2018,2025 ****
}
! if ( $sort ne ''
# If the filter had no messages, this will be undefined
# and there are no ways to sort nothing
! && defined @{$self->{history_keys__}}) {
@{$self->{history_keys__}} = sort {
--- 2017,2026 ----
}
! if ( ( $sort ne '' ) &&
!
# If the filter had no messages, this will be undefined
# and there are no ways to sort nothing
!
! defined @{$self->{history_keys__}} ) {
@{$self->{history_keys__}} = sort {
***************
*** 2031,2034 ****
--- 2032,2036 ----
} @{$self->{history_keys__}};
} else {
+
# Here's a quick shortcut so that we don't have to iterate
# if there's no work for us to do
***************
*** 2038,2042 ****
}
}
!
@{$self->{history_keys__}} = reverse @{$self->{history_keys__}} if ($descending);
}
--- 2040,2044 ----
}
}
!
@{$self->{history_keys__}} = reverse @{$self->{history_keys__}} if ($descending);
}
***************
*** 2691,2709 ****
# History messages
$body .= "<table class=\"historyTable\" width=\"100%\" summary=\"$self->{language__}{History_MainTableSummary}\">\n";
! # column headers
!
! my %headers_table = ( '', 'ID',
! 'from', 'From',
! 'subject', 'Subject',
! 'bucket', 'Classification');
!
!
$body .= "<tr valign=\"bottom\">\n";
!
! foreach my $header (keys %headers_table) {
$body .= "<th class=\"historyLabel\" scope=\"col\">\n";
$body .= "<a href=\"/history?session=$self->{session_key__}&filter=$self->{form_}{filter}&setsort=" . ($self->{form_}{sort} eq "$header"?"-":"");
$body .= "$header\">";
!
my $label = '';
if ( defined $self->{language__}{ $headers_table{$header} }) {
--- 2693,2714 ----
# History messages
$body .= "<table class=\"historyTable\" width=\"100%\" summary=\"$self->{language__}{History_MainTableSummary}\">\n";
!
! # Column headers
!
! my %headers_table = ( '', 'ID',
! 'from', 'From',
! 'subject', 'Subject',
! 'bucket', 'Classification');
!
$body .= "<tr valign=\"bottom\">\n";
!
! # It would be tempting to do keys %headers_table here but there is not guarantee that
! # they will come back in the right order
!
! foreach my $header (undef, 'from', 'subject', 'bucket') {
$body .= "<th class=\"historyLabel\" scope=\"col\">\n";
$body .= "<a href=\"/history?session=$self->{session_key__}&filter=$self->{form_}{filter}&setsort=" . ($self->{form_}{sort} eq "$header"?"-":"");
$body .= "$header\">";
!
my $label = '';
if ( defined $self->{language__}{ $headers_table{$header} }) {
***************
*** 2714,2718 ****
if ( $self->{form_}{sort} =~ /^\-?\Q$header\E$/ ) {
! $body .= "<em class=\"historyLabelSort\">$label" . ($self->{form_}{sort} =~ /^-/ ? "-" : "+") . "</em>";
} else {
$body .= "$label";
--- 2719,2723 ----
if ( $self->{form_}{sort} =~ /^\-?\Q$header\E$/ ) {
! $body .= "<em class=\"historyLabelSort\">" . ($self->{form_}{sort} =~ /^-/ ? "<" : ">") . "$label</em>";
} else {
$body .= "$label";
|