X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPresenter%2FRequirementSpecItem.pm;h=357f8c540c873bb461501de184134730e9b4579a;hb=9bbb6912f72c14e23a25ec0a26e8d68b45b224b8;hp=b7f377e2ccf1e6ca784b8edf4e36d300aab1741e;hpb=442b26e2b4f442a41fbe5fa256b12c0e01219190;p=kivitendo-erp.git diff --git a/SL/Presenter/RequirementSpecItem.pm b/SL/Presenter/RequirementSpecItem.pm index b7f377e2c..357f8c540 100644 --- a/SL/Presenter/RequirementSpecItem.pm +++ b/SL/Presenter/RequirementSpecItem.pm @@ -12,19 +12,21 @@ use Carp; sub requirement_spec_item_tree_node_title { my ($self, $item) = @_; - return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description : $item->title, at => 30), '<' . $item->id . '>')); + return join(' ', map { $_ || '' } ($item->fb_number, $self->truncate($item->parent_id ? $item->description : $item->title, at => 30))); } sub requirement_spec_item_jstree_data { my ($self, $item, %params) = @_; - my @children = map { $self->requirement_spec_item_jstree_data($_, %params) } @{ $item->sorted_children }; + my @children = map { $self->requirement_spec_item_jstree_data($_, %params) } @{ $item->children_sorted }; my $type = !$item->parent_id ? 'section' : 'function-block'; + my $class = $type . '-context-menu tooltip'; + $class .= ' flagged' if $item->is_flagged; return { data => $self->requirement_spec_item_tree_node_title($item), metadata => { id => $item->id, type => $type }, - attr => { id => "fb-" . $item->id, href => $params{href} || '#', class => $type . '-context-menu' }, + attr => { id => "fb-" . $item->id, href => $params{href} || '#', class => $class, title => $item->content_excerpt }, children => \@children, }; }