projects
/
HTML-Widgets-SelectLayers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6487541
)
form_select
author
ivan
<ivan>
Fri, 19 Apr 2002 22:04:19 +0000
(22:04 +0000)
committer
ivan
<ivan>
Fri, 19 Apr 2002 22:04:19 +0000
(22:04 +0000)
Changes
patch
|
blob
|
history
SelectLayers.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
6bda248
..
3ee5241
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-1,5
+1,8
@@
Revision history for Perl extension HTML::Widgets::SelectLayers.
Revision history for Perl extension HTML::Widgets::SelectLayers.
+0.02 unreleased
+ - enable form_select
+
0.01 Thu Mar 7 04:36:46 2002
- original version; created by h2xs 1.21 with options
-A -X -n HTML::Widgets::SelectLayers
0.01 Thu Mar 7 04:36:46 2002
- original version; created by h2xs 1.21 with options
-A -X -n HTML::Widgets::SelectLayers
diff --git
a/SelectLayers.pm
b/SelectLayers.pm
index
7e5bbc8
..
58e1700
100644
(file)
--- a/
SelectLayers.pm
+++ b/
SelectLayers.pm
@@
-3,7
+3,7
@@
package HTML::Widgets::SelectLayers;
use strict;
use vars qw($VERSION);
use strict;
use vars qw($VERSION);
-$VERSION = '0.0
1
';
+$VERSION = '0.0
2
';
=head1 NAME
=head1 NAME
@@
-87,11
+87,12
@@
form_text - (optional) Array reference of text (or hidden) form fields to copy
form_checkbox - (optional) Array reference of checkbox form fields to copy from
the B<form_name> form.
form_checkbox - (optional) Array reference of checkbox form fields to copy from
the B<form_name> form.
+form_select - (optional) Array reference of select (not select multiple) form
+ fields to copy from the B<form_name> form.
+
fixup_callback - (optional) subroutine reference, returns supplimentary
JavaScript for the function described above under FORMS.
fixup_callback - (optional) subroutine reference, returns supplimentary
JavaScript for the function described above under FORMS.
-#form_select
-
size - (optional) size of the E<lt>SELECTE<gt>, default 1.
unique_key - (optional) prepended to all JavaScript function/variable/object
size - (optional) size of the E<lt>SELECTE<gt>, default 1.
unique_key - (optional) prepended to all JavaScript function/variable/object
@@
-191,6
+192,8
@@
sub _fixup {
exists($self->{form_text}) ? $self->{form_text} : [];
my $form_checkbox =
exists($self->{form_checkbox}) ? $self->{form_checkbox} : [];
exists($self->{form_text}) ? $self->{form_text} : [];
my $form_checkbox =
exists($self->{form_checkbox}) ? $self->{form_checkbox} : [];
+ my $form_select =
+ exists($self->{form_select}) ? $self->{form_select} : [];
my $html = "
<SCRIPT>
function ${key}fchanged(what) {
my $html = "
<SCRIPT>
function ${key}fchanged(what) {
@@
-209,9
+212,9
@@
sub _fixup {
what.$f.value = '';\n"
}
what.$f.value = '';\n"
}
-
#
foreach my $f ( @$form_select ) {
-
#
$html .= "what.$f.value = document.$form_name.$f.options[document.$form_name.$f.selectedIndex].value;\n";
-
#
}
+ foreach my $f ( @$form_select ) {
+ $html .= "what.$f.value = document.$form_name.$f.options[document.$form_name.$f.selectedIndex].value;\n";
+ }
$html .= &{$self->{fixup_callback}}() if exists($self->{fixup_callback});
$html .= &{$self->{fixup_callback}}() if exists($self->{fixup_callback});