version 1.501, 2009/11/30 21:17:41
|
version 1.506, 2010/03/10 21:26:10
|
Line 244 sub tokeninputfield {
|
Line 244 sub tokeninputfield {
|
document.tokeninput.barcode.value=''; |
document.tokeninput.barcode.value=''; |
} |
} |
</script> |
</script> |
<form method="post" name="tokeninput"> |
<form method="post" name="tokeninput" action=""> |
<table border="2" bgcolor="#FFFFBB"> |
<table border="2" bgcolor="#FFFFBB"> |
<tr><th>DocID Checkin</th></tr> |
<tr><th>DocID Checkin</th></tr> |
<tr><td> |
<tr><td> |
Line 252 sub tokeninputfield {
|
Line 252 sub tokeninputfield {
|
<tr> |
<tr> |
<td>Scan in Barcode</td> |
<td>Scan in Barcode</td> |
<td><input type="text" size="22" name="barcode" |
<td><input type="text" size="22" name="barcode" |
onChange="updatetoken()"/></td> |
onchange="updatetoken()"/></td> |
</tr> |
</tr> |
<tr><td><i>or</i> Type in DocID</td> |
<tr><td><i>or</i> Type in DocID</td> |
<td> |
<td> |
Line 261 onChange="updatetoken()"/></td>
|
Line 261 onChange="updatetoken()"/></td>
|
<input type="text" size="5" name="codetwo" /> |
<input type="text" size="5" name="codetwo" /> |
<b><font size="+2">*</font></b> |
<b><font size="+2">*</font></b> |
<input type="text" size="10" name="codethree" value="$defhost" |
<input type="text" size="10" name="codethree" value="$defhost" |
onChange="this.value=this.value.toUpperCase()" /> |
onchange="this.value=this.value.toUpperCase()" /> |
</td></tr> |
</td></tr> |
</table> |
</table> |
</td></tr> |
</td></tr> |
Line 1549 sub renderingoptions {
|
Line 1549 sub renderingoptions {
|
} |
} |
my $output; |
my $output; |
unless ($env{'form.forceedit'}) { |
unless ($env{'form.forceedit'}) { |
$output .= ' |
$output .= |
<span class="LC_nobreak">'. |
'<span class="LC_nobreak">'. |
&mt('Language:').' '. |
&mt('Language:').' '. |
&Apache::loncommon::select_form($env{'form.languages'},'languages', |
&Apache::loncommon::select_form( |
%langchoices).' |
$env{'form.languages'}, |
</span>'; |
'languages', |
|
&Apache::lonlocal::texthash(%langchoices)). |
|
'</span>'; |
} |
} |
$output .= ' |
$output .= |
<span class="LC_nobreak">'. |
' <span class="LC_nobreak">'. |
&mt('Math Rendering:').' '. |
&mt('Math Rendering:').' '. |
&Apache::loncommon::select_form($env{'form.texengine'},'texengine', |
&Apache::loncommon::select_form( |
('' => '', |
$env{'form.texengine'}, |
'tth' => 'tth (TeX to HTML)', |
'texengine', |
'jsMath' => 'jsMath', |
&Apache::lonlocal::texthash |
'mimetex' => 'mimetex (Convert to Images)')).' |
('' => '', |
</span>'; |
'tth' => 'tth (TeX to HTML)', |
|
'jsMath' => 'jsMath', |
|
'mimetex' => 'mimetex (Convert to Images)')). |
|
'</span>'; |
return $output; |
return $output; |
} |
} |
|
|
Line 1612 FULLPAGE
|
Line 1617 FULLPAGE
|
} |
} |
</script> |
</script> |
FULLPAGE |
FULLPAGE |
if ($filetype eq 'html') { |
if ($filetype eq 'html' || $filetype eq 'tex') { |
$initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); |
$initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); |
$dragmath_button = &Apache::lonhtmlcommon::dragmath_button('filecont',1); |
$dragmath_button = &Apache::lonhtmlcommon::dragmath_button('filecont',1); |
} |
} |
Line 1742 sub handler {
|
Line 1747 sub handler {
|
|
|
|
|
my $file=&Apache::lonnet::filelocation("",$request->uri); |
my $file=&Apache::lonnet::filelocation("",$request->uri); |
my $filetype; |
my ($filetype,$breadcrumbtext); |
if ($file =~ /\.(sty|css|js|txt)$/) { |
if ($file =~ /\.(sty|css|js|txt|tex)$/) { |
$filetype=$1; |
$filetype=$1; |
} else { |
} else { |
$filetype='html'; |
$filetype='html'; |
} |
} |
|
if ($filetype eq 'sty') { |
|
$breadcrumbtext = 'Style File Editor'; |
|
} elsif ($filetype eq 'js') { |
|
$breadcrumbtext = 'Javascript Editor'; |
|
} elsif ($filetype eq 'css') { |
|
$breadcrumbtext = 'CSS Editor'; |
|
} elsif ($filetype eq 'txt') { |
|
$breadcrumbtext = 'Text Editor'; |
|
} elsif ($filetype eq 'tex') { |
|
$breadcrumbtext = 'TeX Editor'; |
|
} else { |
|
$breadcrumbtext = 'HTML Editor'; |
|
} |
|
|
# |
# |
# Edit action? Save file. |
# Edit action? Save file. |
Line 1782 ENDNOTFOUND
|
Line 1800 ENDNOTFOUND
|
$filecontents=&createnewsty(); |
$filecontents=&createnewsty(); |
} elsif ($filetype eq 'js') { |
} elsif ($filetype eq 'js') { |
$filecontents=&createnewjs(); |
$filecontents=&createnewjs(); |
} elsif (($filetype ne 'css') && ($filetype ne 'txt')) { |
} elsif ($filetype ne 'css' && $filetype ne 'txt' && $filetype ne 'tex') { |
$filecontents=&createnewhtml(); |
$filecontents=&createnewhtml(); |
} |
} |
$env{'form.editmode'}='Edit'; #force edit mode |
$env{'form.editmode'}='Edit'; #force edit mode |
Line 1806 ENDNOTFOUND
|
Line 1824 ENDNOTFOUND
|
# up if it did |
# up if it did |
&Apache::structuretags::reset_problem_globals(); |
&Apache::structuretags::reset_problem_globals(); |
&Apache::lonhomework::finished_parsing(); |
&Apache::lonhomework::finished_parsing(); |
|
} elsif ($filetype eq 'tex') { |
|
$result = &Apache::lontexconvert::converted(\$filecontents, |
|
$env{'form.texengine'}); |
|
if ($env{'form.return_only_error_and_warning_counts'}) { |
|
if (&verify_html('<html><body>'.$result.'</body></html>')) { |
|
$errorcount++; |
|
} |
|
$result = "$errorcount:$warningcount"; |
|
} |
} else { |
} else { |
$result = $filecontents; |
$result = $filecontents; |
} |
} |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['rawmode']); |
['rawmode']); |
if ($env{'form.rawmode'}) { $result = $filecontents; } |
if ($env{'form.rawmode'}) { $result = $filecontents; } |
if ($filetype ne 'html') { |
if (($filetype ne 'html') && |
my $nochgview = 1; |
(!$env{'form.return_only_error_and_warning_counts'})) { |
|
my $nochgview = 1; |
my $controls = ''; |
my $controls = ''; |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$controls = &Apache::loncommon::head_subbox( |
$controls = &Apache::loncommon::head_subbox( |
&Apache::loncommon::CSTR_pageheader() |
&Apache::loncommon::CSTR_pageheader() |
.&Apache::londefdef::edit_controls($nochgview)); |
.&Apache::londefdef::edit_controls($nochgview)); |
} |
} |
if ($filetype ne 'sty') { |
if ($filetype ne 'sty' && $filetype ne 'tex') { |
$result =~ s/</</g; |
$result =~ s/</</g; |
$result =~ s/>/>/g; |
$result =~ s/>/>/g; |
$result = '<table class="LC_sty_begin">'. |
$result = '<table class="LC_sty_begin">'. |
'<tr><td><b><pre>'.$result. |
'<tr><td><b><pre>'.$result. |
'</pre></b></td></tr></table>'; |
'</pre></b></td></tr></table>'; |
} |
} |
if ($env{'environment.remote'} eq 'off') { |
my $brcrum; |
my $brcrum; |
if ($env{'request.state'} eq 'construct') { |
if ($env{'request.state'} eq 'construct') { |
$brcrum = [{'href' => &Apache::loncommon::authorspace(), |
$brcrum = [{'href' => &Apache::loncommon::authorspace(), |
'text' => 'Construction Space'}, |
'text' => 'Construction Space'}, |
{'href' => '', |
{'href' => '', |
'text' => $breadcrumbtext}]; |
'text' => 'Editor'}]; |
|
} else { |
|
$brcrum = ''; # FIXME: Where are we? |
|
} |
|
my %options = ('bread_crumbs' => $brcrum, |
|
'bgcolor' => '#FFFFFF'); |
|
$result = |
|
&Apache::loncommon::start_page(undef,undef,\%options) |
|
.$controls |
|
.$result |
|
.&Apache::loncommon::end_page(); |
|
} else { |
} else { |
$result = $controls.$result; |
$brcrum = ''; # FIXME: Where are we? |
} |
} |
|
my %options = ('bread_crumbs' => $brcrum, |
|
'bgcolor' => '#FFFFFF'); |
|
$result = |
|
&Apache::loncommon::start_page(undef,undef,\%options) |
|
.$controls |
|
.$result |
|
.&Apache::loncommon::end_page(); |
} |
} |
} |
} |
} |
} |
Line 1873 ENDNOTFOUND
|
Line 1897 ENDNOTFOUND
|
'href' => &Apache::loncommon::authorspace(), |
'href' => &Apache::loncommon::authorspace(), |
'text' => 'Construction Space'}, |
'text' => 'Construction Space'}, |
{'href' => '', |
{'href' => '', |
'text' => 'HTML Editor'}]; |
'text' => $breadcrumbtext}]; |
$header = &Apache::loncommon::head_subbox( |
$header = &Apache::loncommon::head_subbox( |
&Apache::loncommon::CSTR_pageheader()); |
&Apache::loncommon::CSTR_pageheader()); |
} |
} |
if ($env{'environment.remote'} ne 'off') { |
|
$options{'bgcolor'} = '#FFFFFF'; |
|
$options{'only_body'} = 1; |
|
} |
|
my $js = |
my $js = |
&Apache::edit::js_change_detection(). |
&Apache::edit::js_change_detection(). |
&Apache::loncommon::resize_textarea_js(); |
&Apache::loncommon::resize_textarea_js(); |