--- loncom/interface/lonhtmlcommon.pm 2010/08/07 19:23:50 1.281
+++ loncom/interface/lonhtmlcommon.pm 2010/10/04 14:34:46 1.284
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.281 2010/08/07 19:23:50 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.284 2010/10/04 14:34:46 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -62,6 +62,11 @@ use Apache::lonlocal;
use Apache::lonnet;
use LONCAPA;
+sub java_not_enabled {
+ return "\n".''.
+ &mt('The required Java applet could not be started. Please make sure to have Java installed and active in your browser.').
+ "\n";
+}
sub coursepreflink {
my ($text,$category)=@_;
@@ -121,7 +126,7 @@ sub dragmath_button {
my ($textarea,$helpicon) = @_;
my $help_text;
if ($helpicon) {
- $help_text = &Apache::loncommon::help_open_topic('Authoring_Math_Editor');
+ $help_text = &Apache::loncommon::help_open_topic('Authoring_Math_Editor',undef,undef,undef,undef,'mathhelpicon_'.$textarea);
}
my $buttontext=&mt('Edit Math');
return <=0) { return ''; }
- }
- return ''.&mt('Disable WYSIWYG Editor').'';
-}
-
-sub enablelink {
- my @fields=@_;
- if (defined($#fields)) {
- unless ($#fields>=0) { return ''; }
- }
- return ''.&mt('Enable WYSIWYG Editor').'';
-}
-
# ------------------------------------------------- lang to use in html editor
sub htmlarea_lang {
my $lang='en';
@@ -1265,7 +1254,7 @@ sub htmlareaselectactive {
.'// {'lang'})) {
if ($args->{'lang'} ne '') {
@@ -1280,6 +1269,8 @@ sub htmlareaselectactive {
if (exists($args->{'dragmath'})) {
if ($args->{'dragmath'} ne '') {
$dragmath_prefix = $args->{'dragmath'};
+ $dragmath_helpicon=&Apache::loncommon::lonhttpdurl("/adm/help/help.png");
+ $dragmath_whitespace=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/transparent1x1.gif");
}
}
}
@@ -1383,6 +1374,16 @@ sub htmlareaselectactive {
return;
}
mathele.style.display = value;
+ var mathhelpicon = "'.$dragmath_prefix.'helpicon'.'_"+id;
+ mathhelpiconele = document.getElementById(mathhelpicon);
+ if (mathhelpiconele == null) {
+ return;
+ }
+ if (value == "none") {
+ mathhelpiconele.src = "'.$dragmath_whitespace.'";
+ } else {
+ mathhelpiconele.src = "'.$dragmath_helpicon.'";
+ }
}
';
@@ -2479,11 +2480,15 @@ sub generate_menu {
# create the markup for the current $link and push it into @links.
# each entry consists of an image and a text optionally followed
# by a help link.
+ my $src;
+ if ($$link{icon} ne '') {
+ $src = '/res/adm/pages/'.$$link{icon};
+ }
push(@links,$li->(
$a->(
$img->("", {
class => "LC_noBorder LC_middle",
- src => "/res/adm/pages/$$link{icon}",
+ src => $src,
alt => mt(defined($$link{alttext}) ?
$$link{alttext} : $$link{linktext})
}), {