--- loncom/interface/spreadsheet/lonspreadsheet.pm 2003/06/16 13:51:46 1.9
+++ loncom/interface/spreadsheet/lonspreadsheet.pm 2003/06/18 15:32:37 1.10
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.9 2003/06/16 13:51:46 www Exp $
+# $Id: lonspreadsheet.pm,v 1.10 2003/06/18 15:32:37 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -126,12 +126,14 @@ sub file_dialogs {
##
## Create the save and load dialogs
my $filename = $spreadsheet->filename();
- $filename = 'Default' if ($filename =~ /^default\.$sheettype/i);
- $filename =~ s/_$sheettype$//;
+ my $truefilename = $filename;
+ if ($spreadsheet->is_default()) {
+ $filename = 'Default';
+ }
my $save_dialog = ''.
' '.
''.
+ $truefilename.'" />'.
'';
my $makedefault_dialog = '';
@@ -142,7 +144,7 @@ sub file_dialogs {
\n";
#
$result .=<initialize();
#
# Output selector
- $r->print('
');
##
## Editing/loading/saving
if ($allowed_to_edit) {
+ if ($ENV{'form.makedefault'}) {
+ $spreadsheet->make_default();
+ }
$r->print(''.$spreadsheet->html_header().' | '.
''.
&file_dialogs($spreadsheet)." |
\n");
@@ -367,6 +364,10 @@ ENDSCRIPT
"\n");
}
#
+ if (! exists($ENV{'form.not_first_run'}) && $sheettype eq 'classcalc') {
+ $r->print('
');
+ }
+ #
# Keep track of the filename
$r->print(&hiddenfield('filename',$filename));
#
@@ -379,8 +380,6 @@ ENDSCRIPT
$r->print($spreadsheet->parent_link());
}
$spreadsheet->display($r);
- } else {
- $r->print("Make your selections and bonk the 'update display' button
");
}
$r->print('