[LON-CAPA-cvs] cvs: rat / lonratmenu.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 04 Apr 2006 15:42:39 -0000


albertel		Tue Apr  4 11:42:39 2006 EDT

  Modified files:              
    /rat	lonratmenu.pm 
  Log:
  - start_page
  
  
Index: rat/lonratmenu.pm
diff -u rat/lonratmenu.pm:1.3 rat/lonratmenu.pm:1.4
--- rat/lonratmenu.pm:1.3	Fri Jun 10 17:45:46 2005
+++ rat/lonratmenu.pm	Tue Apr  4 11:42:39 2006
@@ -37,16 +37,19 @@
     my $include = $Apache::lonnet::perlvar{'lonIncludes'};
     my $jsh=Apache::File->new($include."/ratcode.js");
     $r->send_http_header('text/html');
-    $r->print('<html><head><title>Advanced Editor</title></head>');
-    $r->print(<$jsh>);
+    my $js = join('',<$jsh>);
     my $loaditem = 'onUnload="leave();"';
-    my $bodytag=&Apache::loncommon::bodytag(undef,undef,$loaditem,
-                                        ($env{'environment.remote'} ne 'off')).
-       &Apache::loncommon::help_open_menu('','Sequence_Advanced_Editor_Creation','Sequence_Advanced_Editor_Creation','',6,'RAT');
-    $r->print($bodytag);
+    my $start_page = 
+	&Apache::loncommon::start_page('Advanced Editor',$js,
+				       {'add_entries' => $loaditem,
+					'only_body'   =>
+				       ($env{'environment.remote'} ne 'off')}).
+	&Apache::loncommon::help_open_menu('','Sequence_Advanced_Editor_Creation','Sequence_Advanced_Editor_Creation','',6,'RAT');
+    $r->print($start_page);
     my $readfile=$r->uri;
     $readfile=~s/\/loadonly\/adveditmenu$//;
     $r->print(&print_html($readfile));
+    $r->print(&Apache::loncommon::end_page());
     return OK;
 }
 
@@ -71,11 +74,9 @@
 <td bgcolor="#ccffcc"><a href="javascript:storechange();"><font size="-2">Save map and layout</font></a></td>
 </tr></table>
 </td></tr></table>
-<script>
+<script type="text/javascript">
 main();
 </script>
-</body>
-</html>
 END
     return $pagetext;
 }