From b973fa3aa78197c0df5dfa519502d4f144f61edf Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 19 Aug 2009 14:46:55 +0000 Subject: Bug 505015: Selections are not persistent across submissions - Patch by Frédéric Buclin r=ghendricks a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/reports/create-chart.html.tmpl | 30 ++++++---------------- .../en/default/reports/series-common.html.tmpl | 10 +++++--- 2 files changed, 14 insertions(+), 26 deletions(-) (limited to 'template/en/default/reports') diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl index 4762c62c0..0466b11c1 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 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() {