version 1.150, 2002/11/26 14:58:41
|
version 1.151, 2002/12/02 16:39:30
|
Line 965 sub templaterow {
|
Line 965 sub templaterow {
|
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
my $fm=$sheet->{'f'}->{'template_'.$_}; |
|
$fm=~s/[\'\"]/\&\#34;/g; |
|
push(@cols,{ name => 'template_'.$_, |
push(@cols,{ name => 'template_'.$_, |
formula => $fm, |
formula => $sheet->{'f'}->{'template_'.$_}, |
value => $fm }); |
value => $sheet->{'f'}->{'template_'.$_} }); |
} |
} |
return ($rowlabel,@cols); |
return ($rowlabel,@cols); |
} |
} |
Line 993 sub outrowassess {
|
Line 991 sub outrowassess {
|
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
my $fm=$sheet->{'f'}->{$_.$n}; |
|
$fm=~s/[\'\"]/\&\#34;/g; |
|
push(@cols,{ name => $_.$n, |
push(@cols,{ name => $_.$n, |
formula => $fm, |
formula => $sheet->{'f'}->{$_.$n}, |
value => $sheet->{'values'}->{$_.$n}}); |
value => $sheet->{'values'}->{$_.$n}}); |
} |
} |
return ($rowlabel,@cols); |
return ($rowlabel,@cols); |
Line 1019 sub outrow {
|
Line 1015 sub outrow {
|
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'N','O','P','Q','R','S','T','U','V','W','X','Y','Z', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'a','b','c','d','e','f','g','h','i','j','k','l','m', |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
'n','o','p','q','r','s','t','u','v','w','x','y','z') { |
my $fm=$sheet->{'f'}->{$_.$n}; |
|
$fm=~s/[\'\"]/\&\#34;/g; |
|
push(@cols,{ name => $_.$n, |
push(@cols,{ name => $_.$n, |
formula => $fm, |
formula => $sheet->{'f'}->{$_.$n}, |
value => $sheet->{'values'}->{$_.$n}}); |
value => $sheet->{'values'}->{$_.$n}}); |
} |
} |
return ($rowlabel,@cols); |
return ($rowlabel,@cols); |
Line 1257 sub html_editable_cell {
|
Line 1251 sub html_editable_cell {
|
if ($value =~ /^\s*$/ ) { |
if ($value =~ /^\s*$/ ) { |
$value = '<font color="'.$bgcolor.'">#</font>'; |
$value = '<font color="'.$bgcolor.'">#</font>'; |
} |
} |
|
&Apache::lonnet::logthis($name.' formula = '.$formula) if ($formula); |
|
$formula =~ s/</\</g; |
|
$formula =~ s/>/\>/g; |
|
$formula =~ s/\&/\&/g; |
|
$formula =~ s/\"/\"/g; |
|
$formula =~ s/\'/\"/g; |
$formula =~ s/\n/\\n/gs; |
$formula =~ s/\n/\\n/gs; |
$result .= '<a href="javascript:celledit(\''. |
&Apache::lonnet::logthis($name.' formula = '.$formula) if ($formula); |
$name.'\',\''.$formula.'\');">'.$value.'</a>'; |
$result .= "<a href=\"javascript:celledit(\'". |
|
$name."','".$formula."');\">".$value."</a>"; |
|
&Apache::lonnet::logthis('result = '.$result) if ($formula); |
return $result; |
return $result; |
} |
} |
|
|
Line 2988 sub handler {
|
Line 2990 sub handler {
|
|
|
function celledit(cellname,cellformula) { |
function celledit(cellname,cellformula) { |
var edit_text = ''; |
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 +='<html><head><title>Cell Edit Window</title></head><body>'; |
edit_text += '<form name="editwinform">'; |
edit_text += '<form name="editwinform">'; |
edit_text += '<center><h3>Cell '+cellname+'</h3>'; |
edit_text += '<center><h3>Cell '+cellname+'</h3>'; |