[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
raeburn
raeburn@source.lon-capa.org
Sat, 14 Aug 2010 00:28:18 -0000
raeburn Sat Aug 14 00:28:18 2010 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- resize_textarea() available when editing js, txt, and tex files.
- no "Edit Math" button when editing .tex files.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.513 loncom/xml/lonxml.pm:1.514
--- loncom/xml/lonxml.pm:1.513 Sun Aug 8 02:00:44 2010
+++ loncom/xml/lonxml.pm Sat Aug 14 00:28:18 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.513 2010/08/08 02:00:44 raeburn Exp $
+# $Id: lonxml.pm,v 1.514 2010/08/14 00:28:18 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1492,27 +1492,27 @@
my $dragmath_button;
my ($add_to_onload, $add_to_onresize);
$initialize=&Apache::lonhtmlcommon::spellheader();
- if (($filetype eq 'html') && (&Apache::lonhtmlcommon::htmlareabrowser())) {
+ if (($filetype eq 'html') && (&Apache::lonhtmlcommon::htmlareabrowser())) {
my $lang = &Apache::lonhtmlcommon::htmlarea_lang();
my %textarea_args = (
fullpage => 'true',
dragmath => 'math',
);
- $initialize .=
- &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args).
- (<<FULLPAGE);
+ $initialize .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args);
+ }
+ $initialize .= (<<FULLPAGE);
<script type="text/javascript">
+// <![CDATA[
function initDocument() {
resize_textarea('$textarea_id','LC_aftertextarea');
}
+// ]]>
</script>
FULLPAGE
+ if ($filetype eq 'html') {
+ $dragmath_button = '<span id="math_filecont">'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'</span>';
+ $initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup');
}
- if ($filetype eq 'html' || $filetype eq 'tex') {
- $dragmath_button = '<span id="math_filecont" style="display: block;">'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'</span>';
- $initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup');
- }
-
$add_to_onload = 'initDocument();';
$add_to_onresize = "resize_textarea('$textarea_id','LC_aftertextarea');";