diff options
Diffstat (limited to 'extensions/ComponentWatching/template')
-rw-r--r-- | extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl b/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl index 46acd386f..0eed6b3b3 100644 --- a/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl +++ b/extensions/ComponentWatching/template/en/default/account/prefs/component_watch.html.tmpl @@ -46,6 +46,13 @@ function onSelectProduct() { // support IE component.add(new Option('__Any__', ''), 0); } + if ('[% add_component FILTER js %]' != '' + && bz_valueSelected(Dom.get('product'), '[% add_product FILTER js %]') + ) { + var index = bz_optionIndex(Dom.get('component'), '[% add_component FILTER js %]'); + if (index != -1) + Dom.get('component').options[index].selected = true; + } onSelectComponent(); } @@ -75,7 +82,8 @@ watch "__Any__". <td colspan="2"> <select name="add_product" id="product" onChange="onSelectProduct()"> [% FOREACH product IN selectable_products %] - <option>[% product.name FILTER html %]</option> + <option [% 'selected' IF add_product == product.name %]> + [%~ product.name FILTER html %]</option> [% END %] </select> </td> @@ -83,11 +91,12 @@ watch "__Any__". <tr> <td align="right" valign="top">Component:</td> <td> - <select name="add_component" id="component" multiple size="5" onChange="onSelectComponent()"> + <select name="add_component" id="component" multiple size="10" onChange="onSelectComponent()"> <option value="">__Any__</option> [% FOREACH product IN selectable_products %] [% FOREACH component IN product.components %] - <option>[% component.name FILTER html %]</option> + <option [% 'selected' IF add_component == component.name %]> + [%~ component.name FILTER html %]</option> [% END %] [% END %] </select> |