[LON-CAPA-cvs] cvs: loncom /interface lonfeedback.pm lonhtmlcommon.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 02 Jun 2004 16:41:47 -0000
www Wed Jun 2 12:41:47 2004 EDT
Modified files:
/loncom/interface lonfeedback.pm lonhtmlcommon.pm
Log:
* Getting the logic right for "not not blocked"
* Editor language selection from localization files
* Needed to call standard onSubmit before real submit - posting works now
* Preview is still kaputt ...
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.85 loncom/interface/lonfeedback.pm:1.86
--- loncom/interface/lonfeedback.pm:1.85 Tue Jun 1 17:40:57 2004
+++ loncom/interface/lonfeedback.pm Wed Jun 2 12:41:46 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.85 2004/06/01 21:40:57 www Exp $
+# $Id: lonfeedback.pm,v 1.86 2004/06/02 16:41:46 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,7 +34,8 @@
use Apache::lonmsg();
use Apache::loncommon();
use Apache::lontexconvert();
-use Apache::lonlocal;
+use Apache::lonlocal; # must not have ()
+use Apache::lonhtmlcommon();
sub list_discussion {
my ($mode,$status,$symb)=@_;
@@ -458,7 +459,7 @@
}
}
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
- my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
+ my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
my $send=&mt('Send');
$r->print(<<ENDDOCUMENT);
<html>
@@ -502,6 +503,7 @@
}
if (rec) {
+ document.mailform.onsubmit();
document.mailform.submit();
} else {
alert('Please check a feedback type.');
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.70 loncom/interface/lonhtmlcommon.pm:1.71
--- loncom/interface/lonhtmlcommon.pm:1.70 Mon May 10 14:57:43 2004
+++ loncom/interface/lonhtmlcommon.pm Wed Jun 2 12:41:46 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.70 2004/05/10 18:57:43 matthew Exp $
+# $Id: lonhtmlcommon.pm,v 1.71 2004/06/02 16:41:46 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -868,17 +868,19 @@
# ------------------------------------------------- Output headers for HTMLArea
sub htmlareaheaders {
- unless (&htmlareablocked()) { return ''; }
+ if (&htmlareablocked()) { return ''; }
my $lang='en';
+ if (&mt('htmlarea_lang') ne 'htmlarea_lang') {
+ $lang=&mt('htmlarea_lang');
+ }
return (<<ENDHEADERS);
<script type="text/javascript">
_editor_url="/htmlarea/";
</script>
<script type="text/javascript" src="/htmlarea/htmlarea.js"></script>
-<script type="text/javascript" src="/htmlarea/lang/$lang.js"></script>
-<script type="text/javascript" src="/htmlarea/dialog.js"></script>
-<style type="text/css">
-\@import url(/htmlarea/htmlarea.css);
+<style type="text/javascript">
+_editor_url='/htmlarea/';
+_editor_lang='$lang';
</style>
ENDHEADERS
}
@@ -886,7 +888,7 @@
# ---------------------------------------------------------- Script to activate
sub htmlareaactive {
- unless (&htmlareablocked()) { return ''; }
+ if (&htmlareablocked()) { return ''; }
return (<<ENDSCRIPT);
<script type="text/javascript" defer="1">
HTMLArea.replaceAll();
@@ -897,8 +899,8 @@
# --------------------------------------------------------------------- Blocked
sub htmlareablocked {
- unless (&htmlareabrowser()) { return ''; }
- return 1;
+ unless (&htmlareabrowser()) { return 1; }
+ return 0;
}
# ---------------------------------------- Browser capable of running HTMLArea?