version 1.104, 2005/04/07 06:56:23
|
version 1.107, 2005/06/06 15:54:28
|
Line 259 The method used to restrict user input w
|
Line 259 The method used to restrict user input w
|
sub date_setter { |
sub date_setter { |
my ($formname,$dname,$currentvalue,$special,$includeempty,$state, |
my ($formname,$dname,$currentvalue,$special,$includeempty,$state, |
$no_hh_mm_ss) = @_; |
$no_hh_mm_ss) = @_; |
|
my $wasdefined=1; |
if (! defined($state) || $state ne 'disabled') { |
if (! defined($state) || $state ne 'disabled') { |
$state = ''; |
$state = ''; |
} |
} |
Line 268 sub date_setter {
|
Line 269 sub date_setter {
|
if (! defined($currentvalue) || $currentvalue eq 'now') { |
if (! defined($currentvalue) || $currentvalue eq 'now') { |
unless ($includeempty) { |
unless ($includeempty) { |
$currentvalue = time; |
$currentvalue = time; |
|
$wasdefined=0; |
} else { |
} else { |
$currentvalue = 0; |
$currentvalue = 0; |
} |
} |
Line 279 sub date_setter {
|
Line 281 sub date_setter {
|
localtime($currentvalue); |
localtime($currentvalue); |
$year += 1900; |
$year += 1900; |
} |
} |
|
unless ($wasdefined) { |
|
$sec=0; |
|
$min=0; |
|
} |
my $result = "\n<!-- $dname date setting form -->\n"; |
my $result = "\n<!-- $dname date setting form -->\n"; |
$result .= <<ENDJS; |
$result .= <<ENDJS; |
<script language="Javascript"> |
<script language="Javascript"> |
Line 932 sub crumbs {
|
Line 938 sub crumbs {
|
|
|
sub spellheader { |
sub spellheader { |
my $html=&Apache::lonxml::xmlbegin(); |
my $html=&Apache::lonxml::xmlbegin(); |
|
my $nothing=&javascript_nothing(); |
return (<<ENDCHECK); |
return (<<ENDCHECK); |
<script type="text/javascript"> |
<script type="text/javascript"> |
//<!-- BEGIN LON-CAPA Internal |
//<!-- BEGIN LON-CAPA Internal |
var checkwin; |
var checkwin; |
|
|
function spellcheckerwindow() { |
function spellcheckerwindow() { |
checkwin=window.open('/adm/rat/empty.html','spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); |
checkwin.document.writeln('$html<head></head><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>'); |
checkwin.document.writeln('$html<head></head><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>'); |
checkwin.document.close(); |
checkwin.document.close(); |
} |
} |
Line 953 sub spelllink {
|
Line 960 sub spelllink {
|
my ($form,$field)=@_; |
my ($form,$field)=@_; |
my $linktext=&mt('Check Spelling'); |
my $linktext=&mt('Check Spelling'); |
return (<<ENDLINK); |
return (<<ENDLINK); |
<a href="javascript:if (typeof(document.$form.onsubmit)!='undefined') { document.$form.onsubmit();};spellcheckerwindow();checkwin.document.forms.spellcheckform.text.value=this.document.forms.$form.$field.value;checkwin.document.forms.spellcheckform.submit();">$linktext</a> |
<a href="javascript:if (typeof(document.$form.onsubmit)!='undefined') { if (document.$form.onsubmit!=null) { document.$form.onsubmit();}};spellcheckerwindow();checkwin.document.forms.spellcheckform.text.value=this.document.forms.$form.$field.value;checkwin.document.forms.spellcheckform.submit();">$linktext</a> |
ENDLINK |
ENDLINK |
} |
} |
|
|
Line 1111 returns: nothing
|
Line 1118 returns: nothing
|
# Make the faq and bug data cascade |
# Make the faq and bug data cascade |
my $faq = ''; |
my $faq = ''; |
my $bug = ''; |
my $bug = ''; |
|
my $help=''; |
# 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); |
# |
# |
Line 1135 returns: nothing
|
Line 1143 returns: nothing
|
map { |
map { |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$faq = $_->{'faq'} if (exists($_->{'faq'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
$bug = $_->{'bug'} if (exists($_->{'bug'})); |
|
$help = $_->{'help'} if (exists($_->{'help'})); |
my $result = '<a href="'.$_->{'href'}.'" '; |
my $result = '<a href="'.$_->{'href'}.'" '; |
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
if (defined($_->{'target'}) && $_->{'target'} ne '') { |
$result .= 'target="'.$_->{'target'}.'" '; |
$result .= 'target="'.$_->{'target'}.'" '; |
Line 1150 returns: nothing
|
Line 1159 returns: nothing
|
my $icons = ''; |
my $icons = ''; |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$faq = $last->{'faq'} if (exists($last->{'faq'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
$bug = $last->{'bug'} if (exists($last->{'bug'})); |
|
$help = $last->{'help'} if (exists($last->{'help'})); |
|
$component_help=($component_help?$component_help:$help); |
# if ($faq ne '') { |
# if ($faq ne '') { |
# $icons .= &Apache::loncommon::help_open_faq($faq); |
# $icons .= &Apache::loncommon::help_open_faq($faq); |
# } |
# } |