Diff for /loncom/imspackages/imsimport.pm between versions 1.13 and 1.14

version 1.13, 2005/11/08 17:58:22 version 1.14, 2006/03/23 23:12:21
Line 38  use File::Basename(); Line 38  use File::Basename();
 # ----------------------------------------------------------------  Jscript One  # ----------------------------------------------------------------  Jscript One
 sub jscript_one {  sub jscript_one {
     my ($fullpath,$jsref) = @_;      my ($fullpath,$jsref) = @_;
   
       my $start_page = 
    &Apache::loncommon::start_page('Create IMS import directory',undef,
          {'only_body'   => 1,
    'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'",
    'js_ready'    => 1,});
       my $end_page = 
    &Apache::loncommon::end_page({'js_ready' => 1,});
   
     $$jsref = <<"END_OF_ONE";      $$jsref = <<"END_OF_ONE";
 function verify() {  function verify() {
  if ((document.forms.dataForm.newdir.value == '')  || (!document.forms.dataForm.newdir.value)) {   if ((document.forms.dataForm.newdir.value == '')  || (!document.forms.dataForm.newdir.value)) {
Line 61  function createWin() { Line 70  function createWin() {
   document.dataForm.newdir.value = "";    document.dataForm.newdir.value = "";
   newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes")    newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes")
   newWindow.document.open()    newWindow.document.open()
   newWindow.document.write("<html><head><title>Create IMS import directory</title><meta http-equiv='pragma' content='no-cache'>\\n")    newWindow.document.write('$start_page')
   newWindow.document.write("</head><body bgcolor='#CCFFDD' topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'>\\n")    newWindow.document.write("\\n<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n")
   newWindow.document.write("<img border='0' src='/adm/lonInterFace/author.jpg' alt='[Author Header]'>\\n")  
   newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='600' bgcolor='#CCFFDD'>\\n")    newWindow.document.write("<table border='0' cellspacing='0' cellpadding='0' width='600' bgcolor='#CCFFDD'>\\n")
   newWindow.document.write("<tr><td width='2'>&nbsp;</td><td width='3'>&nbsp;</td>\\n")    newWindow.document.write("<tr><td width='2'>&nbsp;</td><td width='3'>&nbsp;</td>\\n")
   newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\n")    newWindow.document.write("<td><h3>Location: <tt>$fullpath</tt></h3><h3>New Directory</h3></td></tr>\\n")
Line 76  function createWin() { Line 84  function createWin() {
   newWindow.document.write("$fullpath<input type='text' name='newfilename' value=''/>")    newWindow.document.write("$fullpath<input type='text' name='newfilename' value=''/>")
   newWindow.document.write("<input type='button' value='Go' onClick='document.fileaction.submit();' />")    newWindow.document.write("<input type='button' value='Go' onClick='document.fileaction.submit();' />")
   newWindow.document.write("</td></tr>\\n")    newWindow.document.write("</td></tr>\\n")
   newWindow.document.write("</table></body></html>")    newWindow.document.write("</table>")
     newWindow.document.write('$end_page')
   newWindow.document.close()    newWindow.document.close()
   newWindow.focus()    newWindow.focus()
 }  }
Line 860  sub handler { Line 869  sub handler {
     } elsif ($env{'form.phase'} eq 'four') {      } elsif ($env{'form.phase'} eq 'four') {
         &jscript_three(\$javascript);          &jscript_three(\$javascript);
     }      }
     $r->print("<html><head><title>LON-CAPA Construction Space</title><script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n</head>");      $javascript = "<script type=\"text/javascript\">\n//<!--\n$javascript\n// --></script>\n";
                                                                                                
     $r->print(&Apache::loncommon::bodytag('Upload IMS package to Construction Space',undef,$loadentries));      my $title = 'Upload IMS package to Construction Space';
                                                                                                    $r->print(&Apache::loncommon::start_page($title, $javascript,
        {'add_entries' =>
     $loadentries,}));
   
     if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {      if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
         $r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.          $r->print('<h3><font color=red>'.&mt('Co-Author').': '.$uname.
                   &mt(' at ').$udom.'</font></h3>');                    &mt(' at ').$udom.'</font></h3>');
Line 887  sub handler { Line 899  sub handler {
     } else {      } else {
         &Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport');          &Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport');
     }      }
     $r->print('</body></html>');      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;
 }  }
 1;  1;

Removed from v.1.13  
changed lines
  Added in v.1.14


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>