--- loncom/interface/lonhtmlcommon.pm 2010/08/07 19:23:50 1.281
+++ loncom/interface/lonhtmlcommon.pm 2010/08/08 02:00:38 1.282
@@ -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.282 2010/08/08 02:00:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -121,7 +121,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 +1249,7 @@ sub htmlareaselectactive {
.'// {'lang'})) {
if ($args->{'lang'} ne '') {
@@ -1280,6 +1264,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 +1369,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.'";
+ }
}
';