From: justdave%syndicomm.com <> Date: Fri, 8 Feb 2002 11:31:10 +0000 (+0000) Subject: Fix for bug 97966: Changing the product in the query page would remove your component... X-Git-Tag: bugzilla-2.16rc1~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2af3fccf9d416da2fb0828a3f237991364abf01d;p=thirdparty%2Fbugzilla.git 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 --- diff --git a/template/default/query/query.atml b/template/default/query/query.atml index 1582eb3e4f..0d60973bc7 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