summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports/series-common.html.tmpl
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-08-19 16:46:55 +0200
committerlpsolit%gmail.com <>2009-08-19 16:46:55 +0200
commitb973fa3aa78197c0df5dfa519502d4f144f61edf (patch)
tree3cb1df68e35712eb93b0199cc15ae2aca3296449 /template/en/default/reports/series-common.html.tmpl
parent908feaf0555d4fae610db81e1cf4a0574ac439b7 (diff)
downloadbugzilla-b973fa3aa78197c0df5dfa519502d4f144f61edf.tar.gz
bugzilla-b973fa3aa78197c0df5dfa519502d4f144f61edf.tar.xz
Bug 505015: Selections are not persistent across submissions - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
Diffstat (limited to 'template/en/default/reports/series-common.html.tmpl')
-rw-r--r--template/en/default/reports/series-common.html.tmpl10
1 files changed, 6 insertions, 4 deletions
diff --git a/template/en/default/reports/series-common.html.tmpl b/template/en/default/reports/series-common.html.tmpl
index 35586cb47..cecf288ec 100644
--- a/template/en/default/reports/series-common.html.tmpl
+++ b/template/en/default/reports/series-common.html.tmpl
@@ -48,7 +48,6 @@ var series = {
[% END %]
};
-[%# Should attempt to preserve selection across invocations @@@ %]
[%# This function takes necessary action on selection of a category %]
function catSelected() {
var cat = document.chartform.category.value;
@@ -67,7 +66,8 @@ function catSelected() {
[% IF newtext %]
subcatwidget.options[i] = new Option("[% newtext FILTER js %]", "");
[% END %]
-
+
+ subcatwidget.disabled = false;
subcatwidget.options[0].selected = true;
if (document.chartform.action[1]) {
@@ -100,11 +100,13 @@ function checkNewState() {
<td align="left">
<select name="[% sel.name %]" id="[% sel.name %]"
size="[% sel.size %]" style="width: 15em"
+ [%+ 'multiple="multiple"' IF sel.multiple %]
[%+ "disabled=\"disabled\"" UNLESS ${sel.name}.keys.size || newtext %]
[%+ "onchange=\"$sel.onchange\"" IF sel.onchange %]>
[% FOREACH x = ${sel.name}.keys.sort %]
- <option value="[% x FILTER html %]"
- [% " selected" IF default.${sel.name} == x %]>
+ [% value = sel.value_in_hash ? ${sel.name}.$x : x %]
+ <option value="[% value FILTER html %]"
+ [% " selected" IF default.${sel.name} == value %]>
[% x FILTER html %]</option>
[% END %]
[% IF newtext %]