[ADF-1746] node name tooltip pipe (#2480)

* node name tooltip pipe

* update docs
This commit is contained in:
Denys Vuika
2017-10-17 11:41:53 +01:00
committed by Eugenio Romano
parent 0e80f0ab8a
commit 3dfb67313a
4 changed files with 261 additions and 0 deletions

View File

@@ -323,6 +323,7 @@ for more information about installing and using the source code.
- [Node permission directive](node-permission.directive.md)
- [Node restore directive](node-restore.directive.md)
- [Upload directive](upload.directive.md)
- [Node Name Tooltip directive](node-name-tooltip.pipe.md)
- [*Card view content proxy directive](../ng2-components/ng2-alfresco-core/src/components/view/card-view-content-proxy.directive.ts)
- [*Highlight directive](../ng2-components/ng2-alfresco-core/src/directives/highlight.directive.ts)

View File

@@ -0,0 +1,37 @@
# Node Name Tooltip directive
Formats the tooltip of the underlying Node based on the following rules:
* if the *title* and *description* are missing, then the tooltip shows the *name*;
* if the *title* is missing, then the tooltip shows the *name* and *description*;
* if the *description* is missing, then the tooltip shows the *name* and *title*;
* if *name* and *title*, *name* and *description*, or *title* and *description* are the same, then only a single line is displayed.
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [Basic Usage](#basic-usage)
<!-- tocstop -->
<!-- markdown-toc end -->
## Basic Usage
```html
<data-column
key="name"
title="APP.DOCUMENT_LIST.COLUMNS.NAME">
<ng-template let-value="value" let-context>
<span title="{{ context?.row?.obj | adfNodeNameTooltip }}">{{ value }}</span>
</ng-template>
</data-column>
```
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
## See also
<!-- seealso end -->