projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't open a database connection in the parent process
[freeside.git]
/
FS
/
FS
/
svc_acct_pop.pm
diff --git
a/FS/FS/svc_acct_pop.pm
b/FS/FS/svc_acct_pop.pm
index
3c9ea01
..
d224765
100644
(file)
--- a/
FS/FS/svc_acct_pop.pm
+++ b/
FS/FS/svc_acct_pop.pm
@@
-142,8
+142,7
@@
sub popselector {
function popstate_changed(what) {
state = what.options[what.selectedIndex].text;
function popstate_changed(what) {
state = what.options[what.selectedIndex].text;
- for (var i = what.form.popnum.length;i > 0;i--)
- what.form.popnum.options[i] = null;
+ what.form.popnum.options.length = 0
what.form.popnum.options[0] = new Option("", "", false, true);
END
what.form.popnum.options[0] = new Option("", "", false, true);
END
@@
-167,7
+166,13
@@
END
$text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD><TD>';
$text .= qq!<SELECT NAME="popnum" SIZE=1><OPTION> !;
$text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD><TD>';
$text .= qq!<SELECT NAME="popnum" SIZE=1><OPTION> !;
- foreach my $pop ( @svc_acct_pop ) {
+ my @initial_select;
+ if ( scalar(@svc_acct_pop) > 100 ) {
+ @initial_select = qsearchs( 'svc_acct_pop', { 'popnum' => $popnum } );
+ } else {
+ @initial_select = @svc_acct_pop;
+ }
+ foreach my $pop ( @initial_select ) {
$text .= qq!<OPTION VALUE="!. $pop->popnum. '"'.
( ( $popnum && $pop->popnum == $popnum ) ? ' SELECTED' : '' ). ">".
$pop->text;
$text .= qq!<OPTION VALUE="!. $pop->popnum. '"'.
( ( $popnum && $pop->popnum == $popnum ) ? ' SELECTED' : '' ). ">".
$pop->text;
@@
-182,7
+187,7
@@
END
=head1 VERSION
=head1 VERSION
-$Id: svc_acct_pop.pm,v 1.7
2002-04-10 13:42:48
ivan Exp $
+$Id: svc_acct_pop.pm,v 1.7
.4.2 2003-07-04 01:37:44
ivan Exp $
=head1 BUGS
=head1 BUGS