--- loncom/imspackages/imsimport.pm 2005/11/08 17:58:22 1.13 +++ loncom/imspackages/imsimport.pm 2006/03/23 23:12:21 1.14 @@ -38,6 +38,15 @@ use File::Basename(); # ---------------------------------------------------------------- Jscript One sub jscript_one { 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"; function verify() { if ((document.forms.dataForm.newdir.value == '') || (!document.forms.dataForm.newdir.value)) { @@ -61,9 +70,8 @@ function createWin() { document.dataForm.newdir.value = ""; newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes") newWindow.document.open() - newWindow.document.write("Create IMS import directory\\n") - newWindow.document.write("\\n") - newWindow.document.write("[Author Header]\\n") + newWindow.document.write('$start_page') + newWindow.document.write("\\n[Author Header]\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") @@ -76,7 +84,8 @@ function createWin() { newWindow.document.write("$fullpath") newWindow.document.write("") newWindow.document.write("\\n") - newWindow.document.write("
  

Location: $fullpath

New Directory

") + newWindow.document.write("") + newWindow.document.write('$end_page') newWindow.document.close() newWindow.focus() } @@ -860,10 +869,13 @@ sub handler { } elsif ($env{'form.phase'} eq 'four') { &jscript_three(\$javascript); } - $r->print("LON-CAPA Construction Space\n"); - - $r->print(&Apache::loncommon::bodytag('Upload IMS package to Construction Space',undef,$loadentries)); - + $javascript = "\n"; + + 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'})) { $r->print('

'.&mt('Co-Author').': '.$uname. &mt(' at ').$udom.'

'); @@ -887,7 +899,7 @@ sub handler { } else { &Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport'); } - $r->print(''); + $r->print(&Apache::loncommon::end_page()); return OK; } 1;