]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Presenter/RequirementSpecTextBlock.pm
DATEV: single-dbh
[kivitendo-erp.git] / SL / Presenter / RequirementSpecTextBlock.pm
index 8e2eb81a1f5a06b582a66351211f08fe5cadcd7a..8a209d3733ee0805db41a0b58305d94004231b50 100644 (file)
@@ -14,10 +14,13 @@ use SL::JSON;
 sub requirement_spec_text_block_jstree_data {
   my ($self, $text_block, %params) = @_;
 
+  my $class  = 'text-block-context-menu tooltip';
+  $class    .= ' flagged' if $text_block->is_flagged;
+
   return {
     data     => $text_block->title || '',
-    metadata => { id =>         $text_block->id, type => 'textblock' },
-    attr     => { id => "tb-" . $text_block->id, href => $params{href} || '#', class => 'text-block-context-menu' },
+    metadata => { id =>         $text_block->id, type => 'text-block' },
+    attr     => { id => "tb-" . $text_block->id, href => $params{href} || '#', class => $class, title => $text_block->content_excerpt },
   };
 }