[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 14 Aug 2003 13:48:34 -0000


www		Thu Aug 14 09:48:34 2003 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Bug #551: small extra window for previews, etc
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.128 loncom/publisher/lonpublisher.pm:1.129
--- loncom/publisher/lonpublisher.pm:1.128	Wed Aug 13 14:41:59 2003
+++ loncom/publisher/lonpublisher.pm	Thu Aug 14 09:48:34 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.128 2003/08/13 18:41:59 www Exp $
+# $Id: lonpublisher.pm,v 1.129 2003/08/14 13:48:34 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1754,11 +1754,15 @@
       $thisfn=~/\.(\w+)$/;
       my $thistype=$1;
       my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
-
       $r->print('<h2>Publishing '.
-        &Apache::loncommon::filedescription($thistype).' <tt>'.
-        '<a href="/~'.$cuname.'/'.$thisdisfn.'" target="cat">'.$thisdisfn.
-        '</a></tt></h2><b>Target:</b> <tt>'.$thisdistarget.'</tt><br />');
+		&Apache::loncommon::filedescription($thistype).' <tt>');
+
+      $r->print(<<ENDCAPTION);
+<a href='javascript:void(window.open("/~$cuname/$thisdisfn","cat","height=300,width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'>
+$thisdisfn</a>
+ENDCAPTION
+      $r->print(
+        '</tt></h2><b>Target:</b> <tt>'.$thisdistarget.'</tt><br />');
    
       if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) {
           $r->print('<h3><font color="red">Co-Author: '.$cuname.' at '.$cudom.
@@ -1766,9 +1770,10 @@
       }
 
       if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') {
-          $r->print('<br /><a href="/adm/diff?filename=/~'.$cuname.'/'.
-                    $thisdisfn.
-  	  '&versiontwo=priv" target="cat">Diffs with Current Version</a><br />');
+          $r->print(<<ENDDIFF);
+<br />
+<a href='javascript:void(window.open("/adm/diff?filename=/~$cuname/$thisdisfn&versiontwo=priv","cat","height=300,width=500,scrollbars=1,resizable=1,menubar=0,location=1"))'>Diffs with Current Version</a><br />
+ENDDIFF
       }
   
 # ------------------ Publishing from $thisfn to $thistarget with $thisembstyle.