[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet lonspreadsheet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 10 Apr 2006 22:52:36 -0000
albertel Mon Apr 10 18:52:36 2006 EDT
Modified files:
/loncom/interface/spreadsheet lonspreadsheet.pm
Log:
- start_page
Index: loncom/interface/spreadsheet/lonspreadsheet.pm
diff -u loncom/interface/spreadsheet/lonspreadsheet.pm:1.44 loncom/interface/spreadsheet/lonspreadsheet.pm:1.45
--- loncom/interface/spreadsheet/lonspreadsheet.pm:1.44 Thu Apr 6 16:24:13 2006
+++ loncom/interface/spreadsheet/lonspreadsheet.pm Mon Apr 10 18:52:36 2006
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.44 2006/04/06 20:24:13 raeburn Exp $
+# $Id: lonspreadsheet.pm,v 1.45 2006/04/10 22:52:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -334,11 +334,11 @@
#
# Header....
#
- $r->print('<html><head><title>LON-CAPA Spreadsheet</title>');
my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
##
## Spit out the javascript required for editing
##
+ my $js;
if ($allowed_to_edit) {
my %lt=(
'ce' => 'Cell',
@@ -347,7 +347,15 @@
);
my $extra_javascript =
&Apache::loncommon::browser_and_searcher_javascript();
- $r->print(<<ENDSCRIPT);
+
+ my $cell_edit_start =
+ &Apache::loncommon::start_page('Cell Edit Window',undef,
+ {'only_body' => 1,
+ 'js_ready' => 1,});
+ my $cell_edit_end =
+ &Apache::loncommon::end_page({'js_ready' => 1,});
+
+ $js = <<ENDSCRIPT;
<script type="text/javascript">
//<!--
$extra_javascript
@@ -358,7 +366,7 @@
var edit_text = '';
// cellformula may contain less-than and greater-than symbols, so
// we need to escape them?
- edit_text +='<html><head><title>Cell Edit Window</title></head><body>';
+ edit_text +='$cell_edit_start';
edit_text += '<form name="editwinform">';
edit_text += '<center><h3>$lt{'ce'} '+cellname+'</h3>';
edit_text += '<textarea name="newformula" cols="60" rows="12"';
@@ -376,7 +384,7 @@
edit_text += '<input type="button" name="abort" ';
edit_text += 'value="$lt{'dc'}"';
edit_text += ' onClick="javascript:self.close()" />';
- edit_text += '</center></body></html>';
+ edit_text += '</center>$cell_edit_end';
if (editwin != null && !(editwin.closed) ) {
editwin.close();
@@ -396,7 +404,7 @@
text => 'Spreadsheet',
faq => 134,
bug => 'Spreadsheet'});
- $r->print('</head>'.&Apache::loncommon::bodytag('Grades Spreadsheet').
+ $r->print(&Apache::loncommon::start_page('Grades Spreadsheet',$js).
&Apache::lonhtmlcommon::breadcrumbs(undef,'Spreadsheet').
'<form action="'.$r->uri.'" name="sheet" method="post">');
$r->print(&hiddenfield('sname' ,$env{'form.sname'}).