version 1.512, 2010/08/07 19:23:56
|
version 1.515, 2010/09/29 15:47:21
|
Line 1492 sub inserteditinfo {
|
Line 1492 sub inserteditinfo {
|
my $dragmath_button; |
my $dragmath_button; |
my ($add_to_onload, $add_to_onresize); |
my ($add_to_onload, $add_to_onresize); |
$initialize=&Apache::lonhtmlcommon::spellheader(); |
$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 $lang = &Apache::lonhtmlcommon::htmlarea_lang(); |
my %textarea_args = ( |
my %textarea_args = ( |
fullpage => 'true', |
fullpage => 'true', |
dragmath => 'math', |
dragmath => 'math', |
); |
); |
$initialize .= |
$initialize .= &Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args); |
&Apache::lonhtmlcommon::htmlareaselectactive(\%textarea_args). |
} |
(<<FULLPAGE); |
$initialize .= (<<FULLPAGE); |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
function initDocument() { |
function initDocument() { |
resize_textarea('$textarea_id','LC_aftertextarea'); |
resize_textarea('$textarea_id','LC_aftertextarea'); |
} |
} |
|
// ]]> |
</script> |
</script> |
FULLPAGE |
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 = '<div id="math_filecont">'.&Apache::lonhtmlcommon::dragmath_button('filecont',1).'</div>'; |
|
$initialize .= "\n".&Apache::lonhtmlcommon::dragmath_js('EditMathPopup'); |
|
} |
|
|
|
$add_to_onload = 'initDocument();'; |
$add_to_onload = 'initDocument();'; |
$add_to_onresize = "resize_textarea('$textarea_id','LC_aftertextarea');"; |
$add_to_onresize = "resize_textarea('$textarea_id','LC_aftertextarea');"; |
|
|
Line 1537 FULLPAGE
|
Line 1537 FULLPAGE
|
$htmlerror='<span class="LC_error">'.$htmlerror.'</span>'; |
$htmlerror='<span class="LC_error">'.$htmlerror.'</span>'; |
} |
} |
if (&Apache::lonhtmlcommon::htmlareabrowser()) { |
if (&Apache::lonhtmlcommon::htmlareabrowser()) { |
$textareaclass = 'class="LC_richDetectHtml"'; |
$textareaclass = 'class="LC_richDefaultOff"'; |
} |
} |
} |
} |
my $editfooter=(<<ENDFOOTER); |
my $editfooter=(<<ENDFOOTER); |
Line 1554 $initialize
|
Line 1554 $initialize
|
<div class="LC_edit_problem_discards"> |
<div class="LC_edit_problem_discards"> |
<input type="submit" name="discardview" accesskey="d" value="$lt{'dv'}" /> |
<input type="submit" name="discardview" accesskey="d" value="$lt{'dv'}" /> |
<input type="submit" name="Undo" accesskey="u" value="$lt{'un'}" /> |
<input type="submit" name="Undo" accesskey="u" value="$lt{'un'}" /> |
$spelllink $htmlerror |
$htmlerror $dragmath_button |
</div> |
</div> |
<div class="LC_edit_problem_saves"> |
<div class="LC_edit_problem_saves"> |
<input type="submit" name="savethisfile" accesskey="s" value="$lt{'st'}" /> |
<input type="submit" name="savethisfile" accesskey="s" value="$lt{'st'}" /> |
<input type="submit" name="viewmode" accesskey="v" value="$lt{'vi'}" /> |
<input type="submit" name="viewmode" accesskey="v" value="$lt{'vi'}" /> |
</div> |
</div> |
</div> |
</div> |
$dragmath_button |
<textarea $textarea_events style="width:100%" cols="80" rows="44" name="filecont" id="filecont" $textareaclass>$filecontents</textarea><br />$spelllink |
<textarea $textarea_events style="width:100%" cols="80" rows="44" name="filecont" id="filecont" $textareaclass>$filecontents</textarea> |
|
<div id="LC_aftertextarea"> |
<div id="LC_aftertextarea"> |
<br /> |
<br /> |
$titledisplay |
$titledisplay |