version 1.262, 2010/01/24 03:56:09
|
version 1.267, 2010/03/10 20:26:09
|
Line 74 sub coursepreflink {
|
Line 74 sub coursepreflink {
|
|
|
sub raw_href_to_link { |
sub raw_href_to_link { |
my ($message)=@_; |
my ($message)=@_; |
$message=~s/(https?\:\/\/[^\s\'\"]+)(\s|$)/<a href="$1"><tt>$1<\/tt><\/a>$2/gi; |
$message=~s/(https?\:\/\/[^\s\'\"\<]+)([\s\<]|$)/<a href="$1"><tt>$1<\/tt><\/a>$2/gi; |
return $message; |
return $message; |
} |
} |
|
|
Line 90 Successful completion of an operation me
|
Line 90 Successful completion of an operation me
|
sub confirm_success { |
sub confirm_success { |
my ($message,$failure)=@_; |
my ($message,$failure)=@_; |
if ($failure) { |
if ($failure) { |
return '<span class="LC_error">'."\n" |
return '<span class="LC_error" style="font-size: inherit;">'."\n" |
.'<img src="/adm/lonIcons/navmap.wrong.gif" alt="'.&mt('Error').'" /> '."\n" |
.'<img src="/adm/lonIcons/navmap.wrong.gif" alt="'.&mt('Error').'" /> '."\n" |
.$message."\n" |
.$message."\n" |
.'</span>'."\n"; |
.'</span>'."\n"; |
Line 1061 sub Increment_PrgWin {
|
Line 1061 sub Increment_PrgWin {
|
# |
# |
my $str; |
my $str; |
if ($min == 0 && $sec > 1) { |
if ($min == 0 && $sec > 1) { |
$str = '[_2] seconds'; |
$str = '[_1] seconds'; |
} elsif ($min == 1 && $sec > 1) { |
} elsif ($min == 1 && $sec > 1) { |
$str = '1 minute [_2] seconds'; |
$str = '1 minute [_2] seconds'; |
} elsif ($min == 1 && $sec < 2) { |
} elsif ($min == 1 && $sec < 2) { |
Line 1240 sub htmlareaheaders {
|
Line 1240 sub htmlareaheaders {
|
my $s=""; |
my $s=""; |
if (&htmlareabrowser()) { |
if (&htmlareabrowser()) { |
$s.=(<<ENDEDITOR); |
$s.=(<<ENDEDITOR); |
<script type="text/javascript" src="/fckeditor/fckeditor.js"></script> |
|
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script> |
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script> |
ENDEDITOR |
ENDEDITOR |
} |
} |
Line 1284 sub htmlarea_lang {
|
Line 1283 sub htmlarea_lang {
|
sub htmlareaselectactive { |
sub htmlareaselectactive { |
my @fields=@_; |
my @fields=@_; |
unless (&htmlareabrowser()) { return ''; } |
unless (&htmlareabrowser()) { return ''; } |
#if (&htmlareablocked()) { return '<br />'.&enablelink(@fields); } |
|
my $output='<script type="text/javascript" defer="defer">'."\n" |
my $output='<script type="text/javascript" defer="defer">'."\n" |
.'// <![CDATA['."\n"; |
.'// <![CDATA['."\n"; |
my $lang = &htmlarea_lang(); |
my $lang = &htmlarea_lang(); |
Line 1355 sub htmlareaselectactive {
|
Line 1353 sub htmlareaselectactive {
|
}); |
}); |
|
|
}); |
}); |
'; |
'; |
|
|
foreach my $field (@fields) { |
|
$output.=' |
|
|
|
{ |
|
$(document).ready(function() { |
|
if (!($("#'.$field.'").hasClass("LC_richAlwaysOn"))) { |
|
if (!($("#'.$field.'").hasClass("LC_richAlwaysOff"))) { |
|
if (!($("#'.$field.'").hasClass("LC_richDetectHtml"))) { |
|
if (!($("#'.$field.'").hasClass("LC_richDefaultOn"))) { |
|
if (!($("#'.$field.'").hasClass("LC_richDefaultOff"))) { |
|
var oFCKeditor = new FCKeditor("'.$field.'"); |
|
oFCKeditor.Config["CustomConfigurationsPath"] = |
|
"/fckeditor/loncapaconfig.js"; |
|
oFCKeditor.ReplaceTextarea(); |
|
oFCKeditor.Config["AutoDetectLanguage"] = false; |
|
oFCKeditor.Config["DefaultLanguage"] = "'.$lang.'"; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}); |
|
}'; |
|
} |
|
$output.="\nwindow.status='Activated Editfields';\n" |
$output.="\nwindow.status='Activated Editfields';\n" |
.'// ]]>'."\n" |
.'// ]]>'."\n" |
.'</script><br />'. |
.'</script><br />'. |
&disablelink(@fields); |
|
return $output; |
return $output; |
} |
} |
|
|