--- loncom/interface/lonhtmlcommon.pm 2010/01/24 03:56:09 1.262 +++ loncom/interface/lonhtmlcommon.pm 2010/02/19 10:19:33 1.266 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.262 2010/01/24 03:56:09 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.266 2010/02/19 10:19:33 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -74,7 +74,7 @@ sub coursepreflink { sub raw_href_to_link { my ($message)=@_; - $message=~s/(https?\:\/\/[^\s\'\"]+)(\s|$)/$1<\/tt><\/a>$2/gi; + $message=~s/(https?\:\/\/[^\s\'\"\<]+)([\s\<]|$)/$1<\/tt><\/a>$2/gi; return $message; } @@ -90,7 +90,7 @@ Successful completion of an operation me sub confirm_success { my ($message,$failure)=@_; if ($failure) { - return ''."\n" + return ''."\n" .''.&mt('Error').' '."\n" .$message."\n" .''."\n"; @@ -1061,7 +1061,7 @@ sub Increment_PrgWin { # my $str; if ($min == 0 && $sec > 1) { - $str = '[_2] seconds'; + $str = '[_1] seconds'; } elsif ($min == 1 && $sec > 1) { $str = '1 minute [_2] seconds'; } elsif ($min == 1 && $sec < 2) { @@ -1240,7 +1240,6 @@ sub htmlareaheaders { my $s=""; if (&htmlareabrowser()) { $s.=(< ENDEDITOR } @@ -1355,32 +1354,7 @@ 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" .'// ]]>'."\n" .'
'.