From: Moritz Bunkus Date: Mon, 11 Mar 2013 11:53:25 +0000 (+0100) Subject: Pflichtenheftitem: nach Update evtl. auch Parent-Bottom neu rendern X-Git-Tag: release-3.2.0beta~467^2~229 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=3e810abaf0feb18ca5b2ad9c6eae26205081f9a7;p=kivitendo-erp.git Pflichtenheftitem: nach Update evtl. auch Parent-Bottom neu rendern --- diff --git a/SL/Controller/RequirementSpecItem.pm b/SL/Controller/RequirementSpecItem.pm index 75dc503e5..c197aad00 100644 --- a/SL/Controller/RequirementSpecItem.pm +++ b/SL/Controller/RequirementSpecItem.pm @@ -131,12 +131,19 @@ sub action_ajax_update { my $html_bottom = $self->render('requirement_spec_item/_function_block_content_bottom', { output => 0 }, requirement_spec_item => $self->item, id_prefix => $id_prefix); $id_prefix .= 'function-block-content-'; - SL::ClientJS->new + my $js = SL::ClientJS->new ->remove('#' . $prefix . '_form') ->replaceWith('#' . $id_prefix . 'top-' . $self->item->id, $html_top) ->replaceWith('#' . $id_prefix . 'bottom-' . $self->item->id, $html_bottom) - ->jstree->rename_node('#tree', '#fb-' . $self->item->id, $::request->presenter->requirement_spec_item_tree_node_title($self->item)) - ->render($self); + ->jstree->rename_node('#tree', '#fb-' . $self->item->id, $::request->presenter->requirement_spec_item_tree_node_title($self->item)); + + + if ($self->item->get_type eq 'sub-function-block') { + my $parent_html_bottom = $self->render('requirement_spec_item/_function_block_content_bottom', { output => 0 }, requirement_spec_item => $self->item->parent->load); + $js->replaceWith('#function-block-content-bottom-' . $self->item->parent->id, $parent_html_bottom); + } + + $js->render($self); } #