|
From: <jgr...@us...> - 2003-05-02 18:09:24
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv29828/UI
Modified Files:
HTML.pm
Log Message:
Added new feature where each time the history cache gets reloaded during a POPFile session we place a marker. This gives the user a visual clue as to where any new message begin that they have not seen since they last looked at the history
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -d -r1.149 -r1.150
*** HTML.pm 2 May 2003 17:45:38 -0000 1.149
--- HTML.pm 2 May 2003 18:09:19 -0000 1.150
***************
*** 2152,2155 ****
--- 2152,2161 ----
my @history_files = sort compare_mf glob( $self->global_config_( 'msgdir' ) . "popfile*=*.msg" );
+ # This will get set the first time we add a new message to the history
+ # cache and is used to control where we place boundaries in the history
+ # to show where a user left off
+
+ my $set_boundary = 0;
+
foreach my $i ( 0 .. $#history_files ) {
***************
*** 2232,2235 ****
--- 2238,2243 ----
$self->{history__}{$history_files[$i]}{cull} = 0;
$self->{history__}{$history_files[$i]}{index} = $i;
+ $self->{history__}{$history_files[$i]}{boundary} = !$set_boundary;
+ $set_boundary = 1;
}
}
***************
*** 2724,2728 ****
defined( $self->{form_}{reclassify} ) ) {
return $self->http_redirect_( $client, "/history?" . $self->print_form_fields_(1,0,('start_message','filter','search','sort','session') ) );
! }
my $body = '';
--- 2732,2736 ----
defined( $self->{form_}{reclassify} ) ) {
return $self->http_redirect_( $client, "/history?" . $self->print_form_fields_(1,0,('start_message','filter','search','sort','session') ) );
! }
my $body = '';
***************
*** 2802,2806 ****
}
-
$body .= "<th class=\"historyLabel\" scope=\"col\"><input type=\"submit\" class=\"reclassifyButton\" name=\"change\" value=\"$self->{language__}{Reclassify}\" /></th>\n";
$body .= "<th class=\"historyLabel\" scope=\"col\"><input type=\"submit\" class=\"deleteButton\" name=\"deletemessage\" value=\"$self->{language__}{Remove}\" /></th>\n</tr>\n";
--- 2810,2813 ----
***************
*** 2817,2823 ****
my $reclassified = $self->{history__}{$mail_file}{reclassified};
my $index = $self->{history__}{$mail_file}{index} + 1;
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) || ( $highlight_message eq $mail_file ) ) {
$body .= " class=\"rowHighlighted\"";
} else {
--- 2824,2836 ----
my $reclassified = $self->{history__}{$mail_file}{reclassified};
my $index = $self->{history__}{$mail_file}{index} + 1;
+ my $boundary = $self->{history__}{$mail_file}{boundary};
+
+ if ( $boundary && ( $self->{form_}{sort} eq '' ) && ( $i != $start_message ) ) {
+ $body .= "<tr class=\"rowHighlighted\" height=\"2\"><td colspan=\"6\"></td></tr>";
+ }
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) ||
! ( $highlight_message eq $mail_file ) ) {
$body .= " class=\"rowHighlighted\"";
} else {
|