From: Moritz Bunkus Date: Mon, 2 Sep 2013 09:26:23 +0000 (+0200) Subject: Pflichtenhefte: in Zeitabschätzungsmaske erste Selectbox focussen X-Git-Tag: release-3.2.0beta~467^2~64 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b2e51e71121b798a53ec6a60891bdcce08df2eeb;p=kivitendo-erp.git Pflichtenhefte: in Zeitabschätzungsmaske erste Selectbox focussen --- diff --git a/SL/Controller/RequirementSpec.pm b/SL/Controller/RequirementSpec.pm index f99e0bf4d..ee0a94f25 100644 --- a/SL/Controller/RequirementSpec.pm +++ b/SL/Controller/RequirementSpec.pm @@ -120,11 +120,14 @@ sub action_ajax_edit_time_and_cost_estimate { my ($self) = @_; my $html = $self->render('requirement_spec/_edit_time_and_cost_estimate', { output => 0 }); + my $first = ($self->requirement_spec->sections_sorted || [])->[0]; + $first = ($first->children_sorted || [])->[0] if $first; $self->js ->hide('#time_cost_estimate') ->after('#time_cost_estimate', $html) ->on('#time_cost_estimate INPUT[type=text]', 'keydown', 'kivi.requirement_spec.time_cost_estimate_input_key_down') + ->action_if($first && $first->id, 'focus', '#time_and_cost_estimate_form_complexity_id_' . $first->id) ->render($self); } diff --git a/templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html b/templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html index e3975a999..593de9a0c 100644 --- a/templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html +++ b/templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html @@ -6,10 +6,10 @@ [%- P.simple_format(item.fb_number _ ": " _ item.description) -%] - [%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id', title_key='description', default=item.complexity_id, style="width: 100%") %]
+ [%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id_' _ item.id, title_key='description', default=item.complexity_id, style="width: 100%") %]
- [%- L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id', title_key='description', default=item.risk_id, style="width: 100%") %]
+ [%- L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id_' _ item.id, title_key='description', default=item.risk_id, style="width: 100%") %]
[%- IF !item.children.size -%] [%- P.man_days_tag('requirement_spec_items[].time_estimation', item, id=id_prefix _ '_time_estimation') %]