[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm printout.pl
www
lon-capa-cvs@mail.lon-capa.org
Wed, 28 May 2003 21:25:33 -0000
www Wed May 28 17:25:33 2003 EDT
Modified files:
/loncom/interface lonprintout.pm printout.pl
Log:
Bug #1519: printout pages register with Remote
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.186 loncom/interface/lonprintout.pm:1.187
--- loncom/interface/lonprintout.pm:1.186 Wed May 28 16:27:40 2003
+++ loncom/interface/lonprintout.pm Wed May 28 17:25:33 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.186 2003/05/28 20:27:40 bowersj2 Exp $
+# $Id: lonprintout.pm,v 1.187 2003/05/28 21:25:33 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -502,13 +502,14 @@
sub output_data {
my ($r,$helper,$rparmhash) = @_;
my %parmhash = %$rparmhash;
+ my $bodytag=&Apache::loncommon::bodytag('Preparing Printout');
$r->print(<<ENDPART);
<html>
<head>
<title>LON-CAPA output for printing</title>
</head>
-<body bgcolor="FFFFFF">
-<hr>
+$bodytag
+Please stand by while processing your print request, this may take some time ...
ENDPART
my $format_from_helper = $helper->{'VARS'}->{'FORMAT'};
@@ -931,7 +932,7 @@
push @{$printChoices}, ["<b>$resourceTitle</b> (prints what you just saw on the screen)", 'current_document', 'PAGESIZE'];
}
- $r->print($helper->{VARS}->{'postdata'});
+# $r->print($helper->{VARS}->{'postdata'});
# If we're in a sequence...
if ($helper->{'VARS'}->{'construction'} ne '1') {
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.24 loncom/interface/printout.pl:1.25
--- loncom/interface/printout.pl:1.24 Mon May 19 13:17:20 2003
+++ loncom/interface/printout.pl Wed May 28 17:25:33 2003
@@ -2,7 +2,18 @@
use IO::File;
use Image::Magick;
print "Content-type: text/html\n\n";
- print "<body bgcolor=\"#FFFFFF\">\n";
+print (<<ENDSCRIPT);
+ <script type="text/javascript">
+function LONCAPAreg() {
+ swmenu=window.open('',"LCmenumsul1","",false);swmenu.windowloaded(self.name);
+}
+
+function LONCAPAstale() {
+ swmenu=window.open('',"LCmenumsul1","",false);swmenu.windowunloaded(self.name);
+}
+</script>
+ENDSCRIPT
+ print "<body bgcolor='#FFFFFF' onLoad='LONCAPAreg();' onUnload='LONCAPAstate()'>\n";
my ($texfile,$laystyle,$numberofcolumns,$selectionmade) = split(/&/,$ENV{'QUERY_STRING'});
my $figfile = $texfile;
$figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;
@@ -85,7 +96,7 @@
my $comma = "dvips -Ppdf -G0 -o $new_name_file";
system("$comma $name_file 1>/dev/null 2>/dev/null");
if (-e $new_name_file) {
- print "<h1>OUTPUT is in the PDF FILE (see link below)</h1>\n";
+ print "<h1>Successfully created PDF output file (click on link below)</h1>\n";
$new_name_file =~ m/^(.*)\./;
my $tempo_file = $1.'temporar.ps';
my $name_file = $1.'.pdf';