From: lpsolit%gmail.com <> Date: Wed, 19 Aug 2009 14:48:43 +0000 (+0000) Subject: Bug 505015: Selections are not persistent across submissions - Patch by Frédéric... X-Git-Tag: bugzilla-3.4.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72f952f03352a0ccb76349e2a32b100602ebe0b6;p=thirdparty%2Fbugzilla.git Bug 505015: Selections are not persistent across submissions - Patch by Frédéric Buclin r=ghendricks a=LpSolit --- diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl index d911d03fd0..faf4c90d3b 100644 --- a/template/en/default/reports/create-chart.html.tmpl +++ b/template/en/default/reports/create-chart.html.tmpl @@ -50,6 +50,7 @@ function subcatSelected() { i++; } + namewidget.disabled = false; namewidget.options[0].selected = true; checkNewState(); @@ -98,23 +99,16 @@ function subcatSelected() { - - - + [% PROCESS series_select sel = { name => 'name', + size => 5, + multiple => 1, + # We want to use the series ID as value, + # not its name. + value_in_hash => 1 } %] - -

List Of Data Sets To Plot

[% IF chart.lines.size > 0 %] diff --git a/template/en/default/reports/series-common.html.tmpl b/template/en/default/reports/series-common.html.tmpl index 35586cb478..cecf288ec1 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() {