--- loncom/interface/lonhtmlcommon.pm 2005/06/03 15:47:29 1.106
+++ loncom/interface/lonhtmlcommon.pm 2006/04/19 22:26:26 1.125
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.106 2005/06/03 15:47:29 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.125 2006/04/19 22:26:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -100,7 +100,7 @@ sub store_recent {
my ($area,$name,$value)=@_;
my $file=&recent_filename($area);
my %recent=&Apache::lonnet::dump($file);
- if (scalar(keys(%recent))>10) {
+ if (scalar(keys(%recent))>20) {
# remove oldest value
my $oldest=time;
my $delkey='';
@@ -207,6 +207,28 @@ sub checkbox {
return $Str;
}
+
+=pod
+
+=item radiobutton
+
+=cut
+
+##############################################
+##############################################
+sub radio {
+ my ($name,$checked,$value) = @_;
+ my $Str = '\n";
$result .= <
@@ -483,7 +524,7 @@ sub get_date_from_form {
if (($year<70) || ($year>137)) { return undef; }
if (defined($sec) && defined($min) && defined($hour) &&
defined($day) && defined($month) && defined($year) &&
- eval(&timelocal($sec,$min,$hour,$day,$month,$year))) {
+ eval('&timelocal($sec,$min,$hour,$day,$month,$year)')) {
return &timelocal($sec,$min,$hour,$day,$month,$year);
} else {
return undef;
@@ -506,11 +547,13 @@ parameter setting wizard.
##############################################
sub pjump_javascript_definition {
my $Str = < 1,
+ 'bgcolor' => '#88DDFF',
+ 'js_ready' => 1});
+ my $end_page = &Apache::loncommon::end_page({'js_ready' => 1});
+
#the whole function called through timeout is due to issues
#in mozilla Read BUG #2665 if you want to know the whole story
- &r_print($r,'");
$prog_state{'formname'}='popremain';
@@ -931,7 +979,14 @@ sub crumbs {
# --------------------- A function that generates a window for the spellchecker
sub spellheader {
- my $html=&Apache::lonxml::xmlbegin();
+ my $start_page=
+ &Apache::loncommon::start_page('Speller Suggestions',undef,
+ {'only_body' => 1,
+ 'js_ready' => 1,
+ 'bgcolor' => '#DDDDDD',});
+ my $end_page=
+ &Apache::loncommon::end_page({'js_ready' => 1});
+
my $nothing=&javascript_nothing();
return (<
@@ -940,7 +995,7 @@ var checkwin;
function spellcheckerwindow() {
checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
- checkwin.document.writeln('$html