From 2af3fccf9d416da2fb0828a3f237991364abf01d Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Fri, 8 Feb 2002 11:31:10 +0000 Subject: Fix for bug 97966: Changing the product in the query page would remove your component, version, and milestone selections, even if the other product used the same ones, or you were selecting an additional product without unselecting the first one. Patch by Christian Reis r= caillon, justdave --- template/default/query/query.atml | 48 +++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 17 deletions(-) (limited to 'template/default/query') diff --git a/template/default/query/query.atml b/template/default/query/query.atml index 1582eb3e4..0d60973bc 100644 --- a/template/default/query/query.atml +++ b/template/default/query/query.atml @@ -205,11 +205,13 @@ function merge_arrays(a, b, b_is_select) { return ret; } -[%# Returns an array of indexes. +[%# Returns an array of indexes or values from a select form control. # - control: select control from which to find selections - # - findall: boolean, dumping all options if all or just the selected - # indexes. %] -function getSelection(control, findall) { + # - findall: boolean, store all options when true or just the selected + # indexes + # - want_values: boolean; we store values when true and indexes when + # false %] +function getSelection(control, findall, want_values) { var ret = new Array(); if ((!findall) && (control.selectedIndex == -1)) { @@ -218,7 +220,7 @@ function getSelection(control, findall) { for (var i=0; i