Skip to content

Commit 13c2129

Browse files
author
Richard Jones
committed
fix "(list)" popup when list is one item long [SF#1064716]
1 parent 233624b commit 13c2129

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Fixed:
7272
- fix py2.4 strftime() API change bug (sf bug 1087746)
7373
- fix indexer searching with no valid words (sf bug 1086787)
7474
- updated searching / indexing docs
75+
- fix "(list)" popup when list is one item long (sf bug 1064716)
7576

7677

7778
2004-10-26 0.7.9

templates/classic/html/help_controls.js

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,33 @@ function trim(value) {
1515
}
1616

1717
function determineList() {
18-
// generate a comma-separated list of the checked items
19-
var list = new String('');
20-
for (box=0; box < document.frm_help.check.length; box++) {
21-
if (document.frm_help.check[box].checked) {
22-
if (list.length == 0) {
23-
separator = '';
24-
}
25-
else {
26-
separator = ',';
27-
}
28-
// we used to use an Array and push / join, but IE5.0 sux
29-
list = list + separator + document.frm_help.check[box].value;
30-
}
31-
}
32-
return list;
18+
// generate a comma-separated list of the checked items
19+
var list = new String('');
20+
21+
// either a checkbox object or an array of checkboxes
22+
var check = document.frm_help.check;
23+
24+
if ((check.length == undefined) && (check.checked != undefined)) {
25+
// only one checkbox on page
26+
if (check.checked) {
27+
list = check.value;
28+
}
29+
} else {
30+
// array of checkboxes
31+
for (box=0; box < check.length; box++) {
32+
if (check[box].checked) {
33+
if (list.length == 0) {
34+
separator = '';
35+
}
36+
else {
37+
separator = ',';
38+
}
39+
// we used to use an Array and push / join, but IE5.0 sux
40+
list = list + separator + check[box].value;
41+
}
42+
}
43+
}
44+
return list;
3345
}
3446

3547
function updateList() {

0 commit comments

Comments
 (0)