version 1.281, 2010/08/07 19:23:50
|
version 1.282, 2010/08/08 02:00:38
|
Line 121 sub dragmath_button {
|
Line 121 sub dragmath_button {
|
my ($textarea,$helpicon) = @_; |
my ($textarea,$helpicon) = @_; |
my $help_text; |
my $help_text; |
if ($helpicon) { |
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'); |
my $buttontext=&mt('Edit Math'); |
return <<ENDDRAGMATH; |
return <<ENDDRAGMATH; |
Line 1231 ENDJQUERY
|
Line 1231 ENDJQUERY
|
|
|
# ----------------------------------------------------------------- Preferences |
# ----------------------------------------------------------------- Preferences |
|
|
sub disablelink { |
|
my @fields=@_; |
|
if (defined($#fields)) { |
|
unless ($#fields>=0) { return ''; } |
|
} |
|
return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=off&returnurl=','<>&"').&escape($ENV{'REQUEST_URI'}).'">'.&mt('Disable WYSIWYG Editor').'</a>'; |
|
} |
|
|
|
sub enablelink { |
|
my @fields=@_; |
|
if (defined($#fields)) { |
|
unless ($#fields>=0) { return ''; } |
|
} |
|
return '<a href="'.&HTML::Entities::encode('/adm/preferences?action=set_wysiwyg&wysiwyg=on&returnurl=','<>&"').&escape($ENV{'REQUEST_URI'}).'">'.&mt('Enable WYSIWYG Editor').'</a>'; |
|
} |
|
|
|
# ------------------------------------------------- lang to use in html editor |
# ------------------------------------------------- lang to use in html editor |
sub htmlarea_lang { |
sub htmlarea_lang { |
my $lang='en'; |
my $lang='en'; |
Line 1265 sub htmlareaselectactive {
|
Line 1249 sub htmlareaselectactive {
|
.'// <![CDATA['."\n"; |
.'// <![CDATA['."\n"; |
my $lang = &htmlarea_lang(); |
my $lang = &htmlarea_lang(); |
my $fullpage = 'false'; |
my $fullpage = 'false'; |
my $dragmath_prefix; |
my ($dragmath_prefix,$dragmath_helpicon,$dragmath_whitespace); |
if (ref($args) eq 'HASH') { |
if (ref($args) eq 'HASH') { |
if (exists($args->{'lang'})) { |
if (exists($args->{'lang'})) { |
if ($args->{'lang'} ne '') { |
if ($args->{'lang'} ne '') { |
Line 1280 sub htmlareaselectactive {
|
Line 1264 sub htmlareaselectactive {
|
if (exists($args->{'dragmath'})) { |
if (exists($args->{'dragmath'})) { |
if ($args->{'dragmath'} ne '') { |
if ($args->{'dragmath'} ne '') { |
$dragmath_prefix = $args->{'dragmath'}; |
$dragmath_prefix = $args->{'dragmath'}; |
|
$dragmath_helpicon=&Apache::loncommon::lonhttpdurl("/adm/help/help.png"); |
|
$dragmath_whitespace=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/transparent1x1.gif"); |
} |
} |
} |
} |
} |
} |
Line 1383 sub htmlareaselectactive {
|
Line 1369 sub htmlareaselectactive {
|
return; |
return; |
} |
} |
mathele.style.display = value; |
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.'"; |
|
} |
} |
} |
'; |
'; |
|
|