version 1.69, 2004/05/06 17:54:11
|
version 1.71, 2004/06/02 16:41:46
|
Line 868 sub crumbs {
|
Line 868 sub crumbs {
|
# ------------------------------------------------- Output headers for HTMLArea |
# ------------------------------------------------- Output headers for HTMLArea |
|
|
sub htmlareaheaders { |
sub htmlareaheaders { |
unless (&htmlareablocked()) { return ''; } |
if (&htmlareablocked()) { return ''; } |
my $lang='en'; |
my $lang='en'; |
|
if (&mt('htmlarea_lang') ne 'htmlarea_lang') { |
|
$lang=&mt('htmlarea_lang'); |
|
} |
return (<<ENDHEADERS); |
return (<<ENDHEADERS); |
<script type="text/javascript"> |
<script type="text/javascript"> |
_editor_url="/htmlarea/"; |
_editor_url="/htmlarea/"; |
</script> |
</script> |
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script> |
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script> |
<script type="text/javascript" src="/htmlarea/lang/$lang.js"></script> |
<style type="text/javascript"> |
<script type="text/javascript" src="/htmlarea/dialog.js"></script> |
_editor_url='/htmlarea/'; |
<style type="text/css"> |
_editor_lang='$lang'; |
\@import url(/htmlarea/htmlarea.css); |
|
</style> |
</style> |
ENDHEADERS |
ENDHEADERS |
} |
} |
Line 886 ENDHEADERS
|
Line 888 ENDHEADERS
|
# ---------------------------------------------------------- Script to activate |
# ---------------------------------------------------------- Script to activate |
|
|
sub htmlareaactive { |
sub htmlareaactive { |
unless (&htmlareablocked()) { return ''; } |
if (&htmlareablocked()) { return ''; } |
return (<<ENDSCRIPT); |
return (<<ENDSCRIPT); |
<script type="text/javascript" defer="1"> |
<script type="text/javascript" defer="1"> |
HTMLArea.replaceAll(); |
HTMLArea.replaceAll(); |
Line 897 ENDSCRIPT
|
Line 899 ENDSCRIPT
|
# --------------------------------------------------------------------- Blocked |
# --------------------------------------------------------------------- Blocked |
|
|
sub htmlareablocked { |
sub htmlareablocked { |
unless (&htmlareabrowser()) { return ''; } |
unless (&htmlareabrowser()) { return 1; } |
return 1; |
return 0; |
} |
} |
|
|
# ---------------------------------------- Browser capable of running HTMLArea? |
# ---------------------------------------- Browser capable of running HTMLArea? |
Line 975 returns: nothing
|
Line 977 returns: nothing
|
# The last breadcrumb does not have a link, so handle it separately. |
# The last breadcrumb does not have a link, so handle it separately. |
my $last = pop(@Crumbs); |
my $last = pop(@Crumbs); |
# |
# |
# The first one should be the course, I guess. |
# The first one should be the course or a menu link |
if (!defined($menulink)) { $menulink=1; } |
if (!defined($menulink)) { $menulink=1; } |
if ($menulink && exists($ENV{'request.course.id'}) && $ENV{'request.course.id'} ne '') { |
if ($menulink) { |
my $cid = $ENV{'request.course.id'}; |
my $description = 'Menu'; |
|
if (exists($ENV{'request.course.id'}) && |
|
$ENV{'request.course.id'} ne '') { |
|
$description = |
|
$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; |
|
} |
unshift(@Crumbs,{ |
unshift(@Crumbs,{ |
href =>'/adm/menu', |
href =>'/adm/menu', |
title =>'Go to main menu', |
title =>'Go to main menu', |
target =>'_top', |
target =>'_top', |
text =>$ENV{'course.'.$cid.'.description'}, |
text =>$description, |
}); |
}); |
} |
} |
my $links .= |
my $links .= |
join('->', |
join('->', |