summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-10-09 12:04:18 +0000
committerfukachan <fukachan>2004-10-09 12:04:18 +0000
commit53b219d507973df4d0be02ed9a3e94747284089d (patch)
tree13bf9410f9531fe6acc6ac80fbb0a3708c2012ee
parent8f9d5fc399066858255b032820a0b4a067ff84e9 (diff)
downloadfml8-53b219d507973df4d0be02ed9a3e94747284089d.tar.gz
fml8-53b219d507973df4d0be02ed9a3e94747284089d.tar.bz2
fml8-53b219d507973df4d0be02ed9a3e94747284089d.zip
show "back to top" menu in old fashion skin case.
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm37
1 files changed, 33 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index a5f543b7..d7267df4 100644
--- a/fml/lib/FML/Process/CGI/Kernel.pm
+++ b/fml/lib/FML/Process/CGI/Kernel.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Kernel.pm,v 1.81 2004/07/23 15:18:32 fukachan Exp $
+# $FML: Kernel.pm,v 1.82 2004/07/23 15:59:11 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -592,11 +592,11 @@ sub run_cgi_options
# natural language-ed name
my $name_options = $curproc->message_nl('term.options', 'options');
my $name_lang = $curproc->message_nl('term.language', 'language');
- my $name_change = $curproc->message_nl('term.change', 'change');
+ my $name_switch = $curproc->message_nl('term.switch', 'switch to');
my $name_reset = $curproc->message_nl('term.reset', 'reset');
print "<P> <B> $name_options </B>\n";
-
+ print "<BR>\n";
print start_form(-action=>$action);
print $name_lang, ":\n";
@@ -605,7 +605,8 @@ sub run_cgi_options
-default => [ $lang ],
-size => 1);
- print submit(-name => $name_change);
+ print "<BR>\n";
+ print submit(-name => $name_switch);
print reset(-name => $name_reset);
print end_form;
@@ -630,6 +631,9 @@ sub cgi_execute_cgi_menu
my $pcb = $curproc->pcb();
my $command_args = $pcb->get('cgi', 'command_args');
+ # navigation to top menu.
+ $curproc->cgi_menu_back_to_top();
+
if (defined $command_args) {
# XXX-TODO: validate $comname
my $comname = $command_args->{ comname };
@@ -679,6 +683,31 @@ sub cgi_hidden_info_language
}
+# Descriptions: show "back to top" menu.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: none
+sub cgi_menu_back_to_top
+{
+ my ($curproc) = @_;
+ my $target = $curproc->cgi_var_frame_target();
+ my $action = $curproc->cgi_var_action();
+
+ # XXX-TODO: hard-coded. remove this.
+ unless ($0 =~ /config\.cgi/o) {
+ print start_form(-action=>$action, -target=>$target);
+ print $curproc->cgi_hidden_info_language();
+
+ print hidden(-name => 'navi_command', [ '' ]);
+ print hidden(-name => 'command', [ '' ]);
+
+ my $n = $curproc->message_nl("cgi.select_top", "back to top menu.");
+ print submit(-name => $n);
+ print end_form;
+ }
+}
+
+
# XXX-TODO: cgi_try_get_address() -> cgi_var_address() ?
=head2 cgi_try_get_address()