changeset 3044:72399c7c9bcc maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Tue, 04 Jan 2005 01:08:52 +0000
parents 6fbc8633a4c8
children d3a5e382d44a
files CHANGES.txt templates/classic/html/help_controls.js
diffstat 2 files changed, 28 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Mon Jan 03 23:02:27 2005 +0000
+++ b/CHANGES.txt	Tue Jan 04 01:08:52 2005 +0000
@@ -14,6 +14,7 @@
 - fix py2.4 strftime() API change bug (sf bug 1087746)
 - fix indexer searching with no valid words (sf bug 1086787)
 - updated searching / indexing docs
+- fix "(list)" popup when list is one item long (sf bug 1064716)
 
 
 2004-10-26 0.7.9
--- a/templates/classic/html/help_controls.js	Mon Jan 03 23:02:27 2005 +0000
+++ b/templates/classic/html/help_controls.js	Tue Jan 04 01:08:52 2005 +0000
@@ -13,21 +13,33 @@
 }
 
 function determineList() {
-    // generate a comma-separated list of the checked items
-    var list = new String('');
-    for (box=0; box < document.frm_help.check.length; box++) {
-        if (document.frm_help.check[box].checked) {
-            if (list.length == 0) {
-                separator = '';
-            }
-            else {
-                separator = ',';
-            }
-            // we used to use an Array and push / join, but IE5.0 sux
-            list = list + separator + document.frm_help.check[box].value;
-        }
-    }
-    return list;
+     // generate a comma-separated list of the checked items
+     var list = new String('');
+ 
+     // either a checkbox object or an array of checkboxes
+     var check = document.frm_help.check;
+ 
+     if ((check.length == undefined) && (check.checked != undefined)) {
+         // only one checkbox on page
+         if (check.checked) {
+             list = check.value;
+         }
+     } else {
+         // array of checkboxes
+         for (box=0; box < check.length; box++) {
+             if (check[box].checked) {
+                 if (list.length == 0) {
+                     separator = '';
+                 }
+                 else {
+                     separator = ',';
+                 }
+                 // we used to use an Array and push / join, but IE5.0 sux
+                 list = list + separator + check[box].value;
+             }
+         }
+     }
+     return list;  
 }
 
 function updateList() {

Roundup Issue Tracker: http://roundup-tracker.org/