From: Rob H. <for...@us...> - 2002-03-01 08:10:15
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv25884/lib/SandWeb Modified Files: UI.pm Log Message: * this is a start on the javascript pop-up control stuff, i'll send more info about it to the -devel list Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -U2 -r1.27 -r1.28 --- UI.pm 28 Feb 2002 04:36:12 -0000 1.27 +++ UI.pm 1 Mar 2002 08:10:12 -0000 1.28 @@ -61,4 +61,40 @@ } +sub print_popup { + my $self = shift; + my %args = @_; + my $template_dir = $self->_get_template_dir(); + my $log = $self->_logobj(); + + my @debug_msgs = (); + my $message = ''; + # set debug mesg if debug is toggled + if ($log->get_debug_toggle()) { + foreach my $debug_msg ($log->get_debug_msgs()) { + my %debug_content; + $debug_content{'DEBUG_MSG'} = "DEBUG: $debug_msg"; + push @debug_msgs, \%debug_content; + } + } + if ($args{'MESSAGE'}) { + $message = "$args{'MESSAGE'}"; + } + + # incorporate content into framework template + my $output = HTML::Template->new(filename => "$template_dir/framework.html"); + $output->param( + TITLE => $args{'TITLE'}, + MENU_TITLE => $args{'MENU_TITLE'}, + CONTENT => $args{'CONTENT'}, + DEBUG => \@debug_msgs, + MESSAGE => $message, + ); + + # print output + print $output->output; + + return 1; +} + sub get_menu_bar { my $self = shift; |