Component which allows truncating text to a maximum length. When the text is longer than the limitation, the full text is still displayed on mouse-over.

You have to pass the text, length and suffix as parameters to the truncate component.

<span t:type="equanda/Truncate" t:length="20" t:suffix="..." t:text="literal:Very very long text very very long text very very long text"/>

Length and suffix are optional parameters. Default values are 30 and "...".
These can be overwritten in your AppModule using code like

public static void contributeDefaults( MappedConfiguration<String, String> configuration )
configuration.add( "equanda.truncate.default.length", "30" );
configuration.add( "equanda.truncate.default.suffix", "..." );

Style can be overridden by declaring CSS class eqTrunCt.

Default style is:

.eqTrunCt {
position: absolute;
padding: 5px;
border: 1px solid black;
font: normal 12px Verdana;
line-height: 18px;
z-index: 100;
background-color: white;
width: 250px;
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=140,Strength=4);
  • 1. Truncate