Commit ff85006b authored by cyeh%bluemartini.com's avatar cyeh%bluemartini.com

fix for #39044 : Some vers. of some browsers give a script warning on query page when not

using milestones. patch submitted by nkiesel@tbdnetworks.com
parent e8b93c7c
...@@ -431,40 +431,41 @@ function selectProduct(f) { ...@@ -431,40 +431,41 @@ function selectProduct(f) {
} }
} }
var tmsel = new Array(); if (f.target_milestone) {
for (i=0 ; i<f.target_milestone.length ; i++) { var tmsel = new Array();
if (f.target_milestone[i].selected) { for (i=0 ; i<f.target_milestone.length ; i++) {
tmsel[f.target_milestone[i].value] = 1; if (f.target_milestone[i].selected) {
tmsel[f.target_milestone[i].value] = 1;
}
} }
}
f.target_milestone.options.length = 0;
f.target_milestone.options.length = 0;
for (tm in tms) {
for (tm in tms) { if (typeof(tms[v]) == 'function') continue;
if (typeof(tms[v]) == 'function') continue; var doit = doall;
var doit = doall; for (i=0 ; !doit && i<f.product.length ; i++) {
for (i=0 ; !doit && i<f.product.length ; i++) { if (f.product[i].selected) {
if (f.product[i].selected) { var p = f.product[i].value;
var p = f.product[i].value; for (j in tms[tm]) {
for (j in tms[tm]) { if (typeof(tms[tm][j]) == 'function') continue;
if (typeof(tms[tm][j]) == 'function') continue; var p2 = tms[tm][j];
var p2 = tms[tm][j]; if (p2 == p) {
if (p2 == p) { doit = true;
doit = true; break;
break; }
} }
} }
} }
} if (doit) {
if (doit) { var l = f.target_milestone.length;
var l = f.target_milestone.length; f.target_milestone[l] = new Option(tm, tm);
f.target_milestone[l] = new Option(tm, tm); if (tmsel[tm]) {
if (tmsel[tm]) { f.target_milestone[l].selected = true;
f.target_milestone[l].selected = true; }
} }
} }
} }
} }
// --> // -->
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment