--- loncom/interface/lonhtmlcommon.pm 2004/08/29 07:53:00 1.84.2.2
+++ loncom/interface/lonhtmlcommon.pm 2004/08/05 16:59:29 1.86
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.84.2.2 2004/08/29 07:53:00 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.86 2004/08/05 16:59:29 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -869,6 +869,35 @@ sub crumbs {
return $output.''.($noformat?'':'
');
}
+# --------------------- A function that generates a window for the spellchecker
+
+sub spellheader {
+ my $nothing = &javascript_nothing();
+ return (<
+// BEGIN LON-CAPA Internal
+var checkwin;
+
+function spellcheckerwindow() {
+ checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
+ checkwin.document.writeln('');
+ checkwin.document.close();
+}
+// END LON-CAPA Internal
+
+ENDCHECK
+}
+
+# ---------------------------------- Generate link to spell checker for a field
+
+sub spelllink {
+ my ($form,$field)=@_;
+ my $linktext=&mt('Check Spelling');
+ return (<$linktext
+ENDLINK
+}
+
# ------------------------------------------------- Output headers for HTMLArea
sub htmlareaheaders {
@@ -897,14 +926,14 @@ sub htmlareaaddbuttons {
config.registerButton('ed_math','LaTeX Inline',
'/htmlarea/images/ed_math.gif',false,
function(editor,id) {
- editor.surroundHTML(' \$','\$ ');
+ editor.surroundHTML('\$','\$');
}
);
config.registerButton('ed_math_eqn','LaTeX Equation',
'/htmlarea/images/ed_math_eqn.gif',false,
function(editor,id) {
editor.surroundHTML(
- ' \\n\\\\[','\\\\]\\n ');
+ '\\\\[','\\\\]');
}
);
config.toolbar.push(['ed_math','ed_math_eqn']);
@@ -1005,8 +1034,8 @@ returns: nothing
my @Crumbs;
sub breadcrumbs {
- my ($color,$component,$component_help,$function,$domain,$menulink,
- $helplink) = @_;
+ my ($color,$component,$component_help,$function,$domain,$menulink) =
+ @_;
if (! defined($color)) {
if (! defined($function)) {
$function = &Apache::loncommon::get_users_function();
@@ -1068,9 +1097,7 @@ returns: nothing
# if ($bug ne '') {
# $icons .= &Apache::loncommon::help_open_bug($bug);
# }
- if ($helplink ne 'nohelp') {
- $icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug);
- }
+ $icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug);
if ($icons ne '') {
$Str .= $icons.' ';
}