Skip to content

Commit 193d8e9

Browse files
author
Richard Jones
committed
merge from HEAD
1 parent bf583e5 commit 193d8e9

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
@@ -14,6 +14,7 @@ Fixed:
1414
- fix py2.4 strftime() API change bug (sf bug 1087746)
1515
- fix indexer searching with no valid words (sf bug 1086787)
1616
- updated searching / indexing docs
17+
- fix "(list)" popup when list is one item long (sf bug 1064716)
1718

1819

1920
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
@@ -13,21 +13,33 @@ function trim(value) {
1313
}
1414

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

3345
function updateList() {

0 commit comments

Comments
 (0)