summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2469537)
raw | patch | inline | side by side (parent: 2469537)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 6 Nov 2003 07:17:43 +0000 (07:17 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 6 Nov 2003 07:17:43 +0000 (07:17 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1968 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
templates/classic/html/help_controls.js | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index 7ef8fda1e4e4dafe8e3dab1d23a5472df9668bd0..4e1a4ae266895cec6e8a134909acea694e1e4d3e 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- added script to help migrating queries from pre-0.6 trackers
- Fixed "documentation" of getnodeids in roundup.hyperdb
- added flush() to DevNull (sf bug #835365)
+- fixed javascript for help window for only one checkbox case
2003-09-29 0.6.2
index 199cb1faba7ac6558871e492dc92837efd3e826f..c2a84e414583e335042baab6c99a401acd721908 100644 (file)
return temp;
}
-function updateList() {
- // write back to opener window
+function determineList() {
+ // generate a comma-separated list of the checked items
if (document.frm_help.check==undefined) { return; }
var list = new Array();
- for (box=0; box < document.frm_help.check.length; box++) {
- if (document.frm_help.check[box].checked) {
- list.push(document.frm_help.check[box].value);
+ if (document.frm_help.check.length==undefined) {
+ if (document.frm_help.check.checked) {
+ list.push(document.frm_help.check.value);
+ }
+ } else {
+ for (box=0; box < document.frm_help.check.length; box++) {
+ if (document.frm_help.check[box].checked) {
+ list.push(document.frm_help.check[box].value);
+ }
}
}
- window.opener.document.itemSynopsis[field].value = list.join(",");
+ return new String(list.join(','));
+}
+
+function updateList() {
+ // write back to opener window
+ if (document.frm_help.check==undefined) { return; }
+ window.opener.document.itemSynopsis[field].value = determineList();
}
function updatePreview() {
- // add new checkbox selections to preview
+ // update the preview box
if (document.frm_help.check==undefined) { return; }
- var list = new Array();
- for (box=0; box < document.frm_help.check.length; box++) {
- if (document.frm_help.check[box].checked) {
- list.push(document.frm_help.check[box].value);
- }
- }
- listString = new String(list.join(','));
- writePreview(listString);
+ writePreview(determineList());
}
function clearList() {
if (document.frm_help.check==undefined) { return; }
var to_check;
var list = vals.split(",");
- for (box=0; box < document.frm_help.check.length; box++) {
- check = document.frm_help.check[box];
+ if (document.frm_help.check.length==undefined) {
+ check = document.frm_help.check;
to_check = false;
for (val in list) {
if (check.value==trim(list[val])) {
}
}
check.checked = to_check;
- }
-}
-
-function resetList() {
- // reset preview and check boxes to initial values
- if (document.frm_help.check==undefined) { return; }
- var to_check;
- var list = original_field.split(',');
- writePreview(list);
- for (box=0; box < document.frm_help.check.length; box++) {
+ } else {
+ for (box=0; box < document.frm_help.check.length; box++) {
check = document.frm_help.check[box];
to_check = false;
for (val in list) {
}
}
check.checked = to_check;
+ }
}
}
+function resetList() {
+ // reset preview and check boxes to initial values
+ if (document.frm_help.check==undefined) { return; }
+ writePreview(original_field);
+ reviseList(original_field);
+}
+
function writePreview(val) {
// writes a value to the text_preview
document.frm_help.text_preview.value = val;